Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to get exact error message from print stacktrace?

senthilmcaFeb 1 2013 — edited Feb 9 2013
Hi,
While throwing Unique Contraint Exception, getMessage() throws entire statck trace like "insert into <table name> values(<column names>) schemaname.constraintname constarint violation exception

I need to get schemaname.constraintname constarint violation exception alone.

How to extract the message?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 9 2013
Added on Feb 1 2013
4 comments
872 views