Please join us at the new JavaWorld Q&A Forums. Your existing login will work there. The discussions here are now read-only.


JavaWorld Talkback >> 958382

vlad_roubtsov
member


Reged: 06/21/03
Posts: 169
Re: Bad exception handling, again
      08/26/03 01:28 PM

Thanks for the feedback. A couple of counter-arguments:

(a) if the resource cannot be loaded, null is returned if THROW_ON_LOAD_FAILURE is false (to be consistent with ClassLoader.getResourceAsStream() behavior) and an exception is thrown if this flag is true. The only exception that is truly ignored in my code is the one resulting from in.close() -- I have yet to find a reason why not doing so would be useful in any shape or form.

(b) you may have noticed that people who write articles tend to simplify error handling in their posted code anyway: this is to keep things clear and focus on the subject matter instead of details of error handling. The code is not there to be used as is/literally with no changes anyway, but to be read, understood, and reused as fits best for your application.

Post Extras Print Post   Remind Me!     Notify Moderator


Entire topic
Subject Posted by Posted on
* Bad exception handling, again Anonymous 08/26/03 04:11 AM
. * * Re: Bad exception handling, again vlad_roubtsov   08/26/03 01:28 PM
. * * Re: Bad exception handling, again Anonymous   05/02/05 02:58 PM
. * * Re: Bad exception handling, again    11/26/06 08:28 PM

Extra information
0 registered and 3 anonymous users are browsing this forum.

Moderator:   



Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Thread views: 15576

Rate this thread

Jump to

Contact us JavaWorld

Powered by UBB.threads™ 6.5.5