Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Talk:Exception Handling in Java

From Wiki
Jump to: navigation, search
{{{width}}}
19 Sep
2009
Article Review by kalki (20090919)

This article has very big clear explanation on One of the most important concept of java that is Exception Handling. How to write the code to handle it. Most importantly three rules to avoid exception are given like avoid returning values from methods etc.Exceptions are good to handle with care using inbuilt exception classes. Exception handling decreases the chances of breaking application in the middle of the execution.

Step by step instructions with easy going explanation is given with complete code example that are tested well.This articles gives every developers a clear idea on exception handling and the usage of it and with precautions on how to avoid such exceptions.


{{{width}}}
21 Sep
2009
Article Review by Larry101 (20090921)

This is a very well-written discussion on the topic of exception handling in Java. This article would serve as a very useful introduction to anybody new to exception handling in Java. Unlike many other languages, Java “forces” the developer to cater for exceptions in certain circumstances, such as when performing input and output operations.

The author manages to cover several aspects of exception handling in a concise, easy to understand manner. The code examples provided help to clearly illustrate the points made. The article also puts forward three “rules” for handling exceptions, all of which are very valid. Too often, inexperienced programmers will merely “swallow” exceptions. This should almost always be avoided, as an exception indicates that something has gone wrong and code should be written to address the problems which have occurred. Typical examples of code that is needed to handle an exception would be to display an error message or to close a connection.

It was nice to see a nice clear discussion on handling exceptions at different levels and a discussion on when to use the try…catch block and when to use the “throws” syntax. Perhaps one thing that this example lacks is an explanation of the syntax involved. The role of the “finally” block was not explained. In Java this code will always be executed, and is typically used to free up resources and close connections, whether or not an exception has occurred.


 

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×