[e-lang] Semi-bug: No trace from whenResolved block failure
Dean Tribble
dtribble at gmail.com
Fri Sep 1 15:45:34 CDT 2006
I agree. To a first approximation, no exception should ever vanish. This
reminds me of an idea for handling exceptions: to get an exception to *not*
go in the log, you must explicitly call consume() on it. That way, you
never accidentally ignore or catch and drop all exceptions. Without
language support, that might require have a weak-pointer to exceptions to
log them if they are GC'd without being "consumed".
On 9/1/06, Kevin Reid <kpreid at attglobal.net> wrote:
>
> If I use Ref.whenResolved and ignore its result, then a failure in
> the block is discarded silently:
>
> ? { Ref.whenResolved(1 <- add(1), def foo(_) { throw("bang") })
> > "some unrelated value" }
> # value: "some unrelated value"
>
> ...nothing goes in the tracelog...
>
> It would seem to me to be better, and more uniform, if the throw here
> was logged, just as when the call resulting from an eventual send
> fails, the throw is logged at the same time as it is converted into a
> broken reference.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.eros-os.org/pipermail/e-lang/attachments/20060901/cae3f889/attachment.html
More information about the e-lang
mailing list