Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Java only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
Java
Exception.getMessage() returns null.
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
dmjpro
Top Contributor
Join Date:
Jan 2007
Posts:
2476
#1
Exception.getMessage() returns null.
Oct 24 '07, 12:48 PM
Please make me understand ... why Exception.getMe ssage() returns null.
In which situation it happens, please explain me.
Debasis Jana
JosAH
Recognized Expert
MVP
Join Date:
Mar 2007
Posts:
11453
#2
Oct 24 '07, 12:55 PM
Originally posted by
dmjpro
Please make me understand ... why Exception.getMe ssage() returns null.
In which situation it happens, please explain me.
Debasis Jana
[code=java]
new Exception();
[/code]
kind regards,
Jos
Comment
Post
Cancel
dmjpro
Top Contributor
Join Date:
Jan 2007
Posts:
2476
#3
Oct 24 '07, 01:29 PM
Originally posted by
JosAH
[code=java]
new Exception();
[/code]
kind regards,
Jos
Actually my code is something like this ...
[code=java]
try
{
//some code
}catch(Exceptio n e){
//here e.getMessage() returns null
}
[/code]
What should be the possibility?
Debasis Jana
Comment
Post
Cancel
JosAH
Recognized Expert
MVP
Join Date:
Mar 2007
Posts:
11453
#4
Oct 24 '07, 02:01 PM
Originally posted by
dmjpro
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
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment