This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: FW: Kawa and BSF
- To: Allan Erskine <a dot erskine at cs dot ucl dot ac dot uk>
- Subject: Re: FW: Kawa and BSF
- From: brlewis at alum dot mit dot edu
- Date: 10 May 2001 12:11:23 -0400
- Cc: "'Per Bothner'" <per at bothner dot com>, "'Kawa (E-mail)'" <kawa at sources dot redhat dot com>
- References: <005c01c0d8f0$72b10b90$ea4dfea9@spukny>
Allan Erskine <a.erskine@cs.ucl.ac.uk> writes:
> You definitely do not expect a user to catch all throwables, as the user is
> generally not in a position to be able to do anything about most throwables
> (such as ArrayOutOfBounds). The only throwables a user may be able to
> constructively act upon are those that relate directly to the activity they
> are engaged in. If something goes wrong with the way they are using Kawa
> they expect a Kawa exception. Surely....
Any user of eval is reading, possibly compiling, and executing some
arbitrary JVM program. For that activity, *any* throwable may relate
directly. It is an inherently dangerous activity. Forcing a programmer
to catch or declare something won't make this particular activity any
safer.
OTOH, if you want Kawa to define subclasses of RuntimeException and
throw those so that you can be more specific about what you catch
without forcing the rest of us to declare another throwable, ask Per.
Maybe he'd do it or be willing to incorporate a patch from you.
--
Bruce R. Lewis http://brl.sourceforge.net/