469,323 Members | 1,575 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,323 developers. It's quick & easy.

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 17817
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
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by mdpf | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.