[phobos] Calling abort() on unhandled exception

Andrei Alexandrescu andrei at erdani.com
Fri Jul 30 16:18:17 PDT 2010


Steve Schveighoffer wrote:
> What's hard about using something other than exceptions to print usage in short 
> scripts?
> 
> This looks just as readable/easy to me:
> 
> import std.usage;
> 
> int main(string[] args)
> {
>    checkUsage(args.length > 1, "Usage: prog args");
>    ....
> }
> 
> I also would like to see stack traces in small scripts too, esp. when the script 
> isn't throwing the exception.

No scripting language ever behaves that way. They could if they wanted - 
they don't.

Andrei



More information about the phobos mailing list