Exceptions in JavaMail
0 posts in topic
Flat View  Flat View

Posted By:   innum_onenu
Posted On:   Thursday, September 6, 2001 06:49 AM

Developing a JavaMail application to send mails. Problem is this program (see code) could raise any sort of exception. Now the novice client would not understand the general exception message if we put the entire code in a large try catch and say exception.getMessage(). As this would print a blah..blah.. which the end user won;t like!
Now the question is how best can we handle these possible exceptions? so that for every exception(all possible)we can give the user a better message!

For this we need to know what;all exceptions can be thrown and then catch each of them separtely? Is this a good way? or any other way of doing this?

About | Sitemap | Contact