Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Java (http://www.programmingforums.org/forum17.html)
-   -   [Catch block] (http://www.programmingforums.org/showthread.php?t=14855)

pricka Jan 2nd, 2008 5:10 PM

[Catch block]
 
Can any body explain to me why this code has the ending with e.getMassage? What does it mean and do "System.err.print("ClassNotFoundException: " + e.getMessage());
:icon_question:

null_ptr0 Jan 2nd, 2008 5:51 PM

Re: [Catch block]
 
e is probably an instance of a ClassNotFoundException, and getMessage() is a public member method of Throwable, and, seeing ClassNotFoundException originates from Throwable, you can access it.

mrynit Jan 2nd, 2008 11:29 PM

Re: [Catch block]
 
You can see what the method does here http://java.sun.com/javase/6/docs/ap...ml#getMessage() and many other methods. The Java doc is a very good resource. It is used as a way to see what goes wrong. For example the error message could be writen to an error log for debugging.

pricka Jan 3rd, 2008 2:20 AM

Re: [Catch block]
 
mrynit,
Thank you so much for the help I will try to see how far I can go with this, certainly am happy about your concern

pricka Jan 3rd, 2008 2:22 AM

Re: [Catch block]
 
null_ptro, thanks alot Idea taken.
Be blessed


All times are GMT -5. The time now is 4:09 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC