Loading ...
Sorry, an error occurred while loading the content.

92857VS: [XP] Test Driven Exceptions

Expand Messages
  • lasse.koskela@accenture.com
    Jun 3, 2004
    • 0 Attachment
      JB:
      > ...or...
      >
      > | public int toInt(String s) {
      > | try {
      > | return Integer.parseInt(s);
      > | } catch (NumberFormatException ignored) {
      > | }
      > | }

      ...except that this won't compile ;)

      JB:
      > (By the way... NumberFormatException is unchecked, so I don't even have
      > to catch it!)

      Wow. So it seems. I picked a bad example after all.
      I'm so used to "expect" a NumberFormatException that I've subconsciously made it a "checked" exception :)

      - Lasse -



      This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.


      [Non-text portions of this message have been removed]
    • Show all 15 messages in this topic