W3C home > Mailing lists > Public > www-jigsaw@w3.org > July to August 1997

catch (Exception ex) { }

From: Dave Makower <davemak@pencom.com>
Date: Tue, 15 Jul 1997 10:50:54 -0400
Message-Id: <l03102801aff13476ea96@[10.30.1.31]>
To: Jigsaw Mailing List <www-jigsaw@w3.org>
It seems that there are exactly 241 places in the Jigsaw 1.0a5 source code
that catch the generic exception class Exception; quite a few of these
respond by doing absolutely nothing, not even a call to printStackTrace().
I realize that this is probably intended to keep the user/administrator
from being alerted in the case of several "normal" exceptions, but it has
the highly unfortunate side-effect of making Jigsaw resources very
difficult to debug.  If, for instance, Jigsaw resources trigger a
NullPointerException during presentation, Jigsaw often ignores this
completely.

I'd like to suggest that someone take a careful look at all places in the
code where Exception is caught and ignored, and make a decision either to:

(a) print a stack trace, so that the error is reported even if no other
action is taken, or

(b) catch one or more specific subclasses of Exception

(c) distinguish between RuntimeExceptions and all others, so that
RuntimeExceptions are always reported, or at least re-thrown for the Java
interpreter to deal with.



+---------------------+-------------------------+---------------------+
|    Dave Makower     |    davemak@pencom.com   |   WWW Specialist    |
+---------------------+-------------------------+---------------------+
|     Co-author of "Java Programming Basics" (Henry Holt/MIS:Press)   |
|                 http://www.pencom.com/javabasics/                   |
+----------------------------------+----------------------------------+
|   Pencom Web Works               |   (212) 513-7777   voice         |
|   40 Fulton St.                  |   (212) 513-1014   fax           |
|   New York, NY  10038            |   http://www.pencom.com/         |
+----------------------------------+----------------------------------+
Received on Tuesday, 15 July 1997 10:42:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:26 GMT