I'm a little confused, Errors come from program bugs, they shouldn't
be recovered, but you are saying that cleanup can still be had through
catch/throw? You mean that the cleanup code used for making Exception
safe code would need to be duplicated in the try/catch of Errors too?

You say Exceptions should be used for recovery, but don't provide what
you should use when you aren't trying to recover but want to cleanup
on program bugs (I don't see cleanup as recovery). And yes I would
consider an escaping exception to usually indicate a program bug too.

On Thu, Mar 15, 2012 at 3:25 PM, Walter Bright <[email protected]> wrote:

> If any of that cleanup code actually needs to run on program bug shutdown,
> it still can be done with catch/throw. The other stuff assumes normal
> operation and is not needed to be run for shutdown/logging.
_______________________________________________
dmd-internals mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-internals

Reply via email to