Andrej Mitrovic Wrote:

> That goes against the statement in TDPL that user code should never catch
> Throwable's, unless absolutely necessary. So in case of collateral
> exceptions, we are forced to catch Throwable anyway?

You should avoid explicitly catching Throwable, but I can see what you're 
getting at: if a collateral exception is an Error then it should not be 
ignored.  You could always do something like this:

catch (Exception e) {
    for (Throwable t = e; t; t = t.next) {
        if (cast(Error) t)
            throw t; // collateral damage critical!
        writeln(t);
    }
}

Reply via email to