Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

run time exception

Question posted by: prisesh26 (Newbie) on May 15th, 2008 04:25 AM
hi,

iam getting exception (for duplicate key )displayed when i do ps.executeUpdate(); i ll get this duplicate key exception rarely.
but i dont want the whole eception to be displayed in the console. instead i want to display in single line. i want to display in single readable line

i am catching the exception but still before it comes to catch section it is throwing the exception stack trace in my console.


how to control this.
please help.
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
BigDaddyLH's Avatar
BigDaddyLH
Moderator
1,147 Posts
May 15th, 2008
05:22 AM
#2

Re: run time exception
Quote:
Originally Posted by prisesh26
hi,

iam getting exception (for duplicate key )displayed when i do ps.executeUpdate(); i ll get this duplicate key exception rarely.
but i dont want the whole eception to be displayed in the console. instead i want to display in single line. i want to display in single readable line

i am catching the exception but still before it comes to catch section it is throwing the exception stack trace in my console.


how to control this.
please help.


Are you executing this code from within an IDE? They can often trap exceptions at the moment they are created.

Reply
JosAH's Avatar
JosAH
Chief Editor
6,797 Posts
May 15th, 2008
05:29 AM
#3

Re: run time exception
Quote:
Originally Posted by BigDaddyLH
Are you executing this code from within an IDE? They can often trap exceptions at the moment they are created.


Really? So this get trapped by an IDE?

Code: ( text )
  1. MyException magritte= new MyException("ceci n'est pas une erreur");


kind regards,

Jos

Reply
BigDaddyLH's Avatar
BigDaddyLH
Moderator
1,147 Posts
May 15th, 2008
02:54 PM
#4

Re: run time exception
Quote:
Originally Posted by JosAH
Really? So this get trapped by an IDE?

Code: ( text )
  1. MyException magritte= new MyException("ceci n'est pas une erreur");


kind regards,

Jos


Err, I mean that if you are executing code in debugging mode, execution may break at the point that the exception is thrown, to give you a chance to examine the context.

Reply
JosAH's Avatar
JosAH
Chief Editor
6,797 Posts
May 15th, 2008
03:19 PM
#5

Re: run time exception
Ah, ok comprendo; no further questions your Honour.

kind regards,

Jos ;-)

Reply
Reply
Not the answer you were looking for? Post your question . . .
170,099 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Top Java Forum Contributors