More exception classes into Phobos?

Adam D. Ruppe via Digitalmars-d digitalmars-d at puremagic.com
Thu Mar 23 13:45:08 PDT 2017


On Thursday, 23 March 2017 at 19:47:29 UTC, Walter Bright wrote:
> Over time I've found that standardized Exception types seem to 
> become less and less useful over just using "Exception" with an 
> appropriate message.

I'm of the firm belief that exceptions should NEVER have a string 
message - that's a code smell. If you do it right, all the info 
can be determined automatically by the exception type and passed 
arguments and *that* is what gets printed to string.

D can do a pretty amazing job at this too with templates btw.


More information about the Digitalmars-d mailing list