This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: FW: Kawa and BSF


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]