Line number of Exception instantiation

BCS none at anon.com
Thu Mar 4 12:38:09 PST 2010


Hello bearophile,

> What do you think of the idea of the Exception to remember (so later
> it can be shown if uncaught) the line number and file name where it
> was instantiated?
> 

It shouldn't be hard, add default parameters to the constructor:

this(string msg, string file = __FILE__, int line = __LINE__) { ... }

-- 
... <IXOYE><






More information about the Digitalmars-d mailing list