[e-lang] Exception types and ejector patterns (was Re: Remaining semantic issues)
kpreid at mac.com
Tue Jul 25 15:18:50 EDT 2006
On Jul 22, 2006, at 21:07, Mark S. Miller wrote:
> In order to make your ejSwitch idea above work, the ejector
> argument might get thrown, and so must be the kind of thing that
> could be, or be included in, an exception. Given this constraint, I
> suppose it may as well be an exception. On E-on-Java, it would
> currently be hard to enable E programs to define new exception
> types. But if we decide that's the right thing, we could certainly
> do it.
E-on-CL has essentially the same problem (CL:CONDITION =
java.lang.Throwable), and as a workaround it defines a generic
condition class with properties defined at creation time. See tests/
Further, I see no reason we couldn't define a condition/Throwable
that's a forwarding wrapper around an arbitrary E object.
> Once an exception is thrown, I remain skeptical about whether it
> would then be useful and robust to dispatch on its type.
Debugging. Last-resort failure handling ("what do I tell the user
Kevin Reid <http://homepage.mac.com/kpreid/>
More information about the e-lang