Alternatives to exceptions for error handling
Adam D. Ruppe
destructionator at gmail.com
Sun Nov 29 23:31:05 UTC 2020
On Sunday, 29 November 2020 at 23:20:13 UTC, Roman Kashitsyn
wrote:
> Sometimes a crash with a core dump might be preferable to stack
> unwinding as the core dump might contain more useful
> information than a stack trace.
That's exactly what you get with an uncaught exception (remember
the druntime catches exceptions by default, turn that off to get
this behavior). One of my favorite parts of them and i'm not sure
how a sumtype thing would compare. I guess you could set a
conditional breakpoint.
I'm pro-exception but I also do think D should go ahead and move
forward with making the return value type thing work better. If
we do it right, the supporting features can be useful in other
contexts too.
More information about the Digitalmars-d
mailing list