Robust Java Exception Handling

Hoa Dang Nguyen and Magnar Sveen published a very interesting paper on building robust Java applications by correctly applying exception handling. They explain how exceptions work in Java, when and how to use them, and provide sample source code to demonstrate their recommendations.

In the past, I have written about exception handling best practice and EJB exception handling.

Technorati Tags:

2 Replies to “Robust Java Exception Handling”

  1. It may be ok for a lame undergrad paper, but
    that’s about it.

    Let’s see: they take the first 16
    pages to rehash basic things about
    exceptions that every programmer
    knows (what is this, a book report on
    a Java manual?). The rest is rehashing
    lesser known – but still well known –
    style guides. I am not impressed.

  2. Gregory,

    I think you are being harsh on the authors. They have not simply rehashed the Java specifications, but have actually researched real-life programs and identified the common mistakes that programmers make when dealing with exception handling — they refer to open-source Java applications in their analysis.

    You may have noticed that one of their findings is that there is a basic flaw in the teaching of Java programming in that exception handling is introduced at a late stage, which wrongly induces the belief that it is not important during the design phase of the development lifecycle. James Gosling observed the same thing about exception handling in his interview by Bill Verners.

    The paper not only complements existing style guides but adds a comparison of tools that can help making programs more robust by optimising exception handling.

    Written based on research, this paper provides a unique source of documention on efficient exception handling, which can only be a good thing. You may not be impressed, but it remains a very good resource.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: