Article:
  What I Hate About Your Programming Language
Subject:   Java + Exceptions
Date:   2003-05-14 10:51:38
From:   chromatic
Response to: Java + Exceptions

Yep, that's what I mean. I don't consider having to say "by the way, this method doesn't want to catch an exception, so it's going to throw it up the call stack" to be "ignoring" an exception.


In general, I'm not a fan of writing code to tell the compiler to do nothing. Sometimes I want to ignore FileNotFound -- it's okay, I know what I'm doing.

Main Topics Oldest First

Showing messages 1 through 1 of 1.

  • Java + Exceptions
    2003-05-15 02:03:11  anonymous2 [View]

    No you clearly do not know what you are doing. The whole point of checked exceptions is that the compiler can help verify that you are not forgetting to handle them.

    You have to catch the FileNotFoundException somewhere... might as well make the code clear as to what is going on.

    If you are happy to have your program exit with a stack trace... then you really really do not have a clue as to what you are doing.