471,887 Members | 1,463 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,887 software developers and data experts.

Exception.getMessage() returns null.

dmjpro
2,476 2GB
Please make me understand ... why Exception.getMessage() returns null.
In which situation it happens, please explain me.

Debasis Jana
Oct 24 '07 #1
3 18427
JosAH
11,448 Expert 8TB
Please make me understand ... why Exception.getMessage() returns null.
In which situation it happens, please explain me.

Debasis Jana
Expand|Select|Wrap|Line Numbers
  1. new Exception();
  2.  
kind regards,

Jos
Oct 24 '07 #2
dmjpro
2,476 2GB
Expand|Select|Wrap|Line Numbers
  1. new Exception();
  2.  
kind regards,

Jos
Actually my code is something like this ...

Expand|Select|Wrap|Line Numbers
  1. try
  2. {
  3. //some code
  4. }catch(Exception e){
  5. //here e.getMessage() returns null
  6. }
  7.  
What should be the possibility?

Debasis Jana
Oct 24 '07 #3
JosAH
11,448 Expert 8TB
What should be the possibility?
Did you read my previous reply? If an Exception is created without passing it
a String message the Exception will return null as its message.

kind regards,

Jos
Oct 24 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Toon Huysmans | last post: by
2 posts views Thread by dinks | last post: by
reply views Thread by Mike Grishaber | last post: by
3 posts views Thread by kalvarahul | last post: by
reply views Thread by YellowAndGreen | last post: by
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.