[phobos] Calling abort() on unhandled exception
Sean Kelly
sean at invisibleduck.org
Fri Jul 30 07:42:51 PDT 2010
On Jul 29, 2010, at 10:01 PM, Andrei Alexandrescu wrote:
>
> I for one really enjoy stuff like:
>
> void main(string[] args)
> {
> enforce(args.length > 1, "Usage: prog arg");
> ...
> }
>
> Having a stack trace tacked there... not good. Exception messages are meant to be seen by users. Stack traces are meant to be seen by the programmer. The fact that we print both by default doesn't sit well at all.
Fair enough. Maybe they should only be displayed for Errors, not Exceptions?
> Is it reasonable to say that Exception is the "nicer" thing and Throwable is the "less nice" thing that is handled differently? Then come bus errors, which are "not nice at all".
It is.
More information about the phobos
mailing list