Re: Test or NullPointerException catch




"Wendy S" <wendywds@xxxxxxxxxxx> wrote in message
news:jzSie.17$8p.1@xxxxxxxxxxxxx
> "Larry Barowski" <MElarrybar-AT-eng_DOT_auburnANOTHERDOTeduEND> wrote
>
> > Normally you should only catch checked exceptions.
> > Imagine there is a bug in that code, let's say an extremely
> > rare one, that throws a NPE. You would just catch and
> > ignore it, so you might not even be able to notice the bug
> > unless you determine that the data was not being processed
> > correctly.
>
> I agree that in general you shouldn't catch unchecked exceptions, but
since
> when does catching an exception automatically mean ignoring it?

It means ignoring or mis-handling other unexpected
exceptions caused by bugs. That is fairly clear in my
statement above.


.



Relevant Pages

  • Re: Structured exception information
    ... subprograms should raise exceptions because of precondition ... A precondition violation is not an exceptional state, it is a bug. ...
    (comp.lang.ada)
  • Re: JavaScript error with onChange event handler -- FireFox 1.5
    ... That looks like the old autocomplete bug, but it was fixed in Firefox ... You code runs w/o exceptions on test machines. ... Also this bug leads to an exception, not to an error: ... script execution is not aborted. ...
    (comp.lang.javascript)
  • Re: Exception handling philosophy
    ... Richard Grossman wrote: ... The reports and dialogs displayed could be very helpful and look very professional. ... > 2 There are exceptions that are explicitly handled, such as during opening and saving files, and don't need any additonal handling since they represent a local issue and not a bug. ...
    (borland.public.delphi.non-technical)
  • Re: Kann Java nicht mit Byte-Zahlen rechnen?
    ... - * Exceptions werfen könnten. ... gedeckten Sicherheit geschrieben sind, daß ... Bug gefixt wird ist das ja nie rückwärtskompatibel, ... Und wie Integer-Arithmetik ...
    (de.comp.lang.java)
  • Re: Writing bulletproof code
    ... If your program has a bug that you ... client and library code, when we let the client programmer goof ... Arthur Arthur gcc warning at compile time, ... Exceptions allow graceful management of errors. ...
    (comp.programming)