scope() statements and return

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Sun Oct 5 10:00:05 PDT 2014


On Sun, 05 Oct 2014 16:47:26 +0000
Dicebot via Digitalmars-d <digitalmars-d at puremagic.com> wrote:

> Pretty much only reason `Error` is not equivalent to plain 
> `abort` call is to allow some last resort debbugging dump and 
> provide more meaningful information about the failure.
than it was done very wrong. it's ok to have some arcane chain of
"error handlers" in runtime, 'cause writing such handlers is not the
kind of task people do often. but allowing to throw Error as any
other exception or to catch Error the same way other exceptions can be
catched is misleading. any sane person will think about Error as just
another kind of Exception, just with different naming.

there must be separate case for Errors, something like "final throw",
which will not do ANY unwinding, cannot be catched, and just calling
"error handlers chain" and aborts. it's not enough to just paint a duck.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20141005/f01ffe9b/attachment-0001.sig>


More information about the Digitalmars-d mailing list