Line number of Exception instantiation

Fawzi Mohamed fmohamed at mac.com
Thu Mar 4 12:57:44 PST 2010


On 2010-03-04 21:38:09 +0100, BCS <none at anon.com> said:

> 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__) { ... }

yes I always do it, I find it useful information, and it is available 
even in a fully optimized build...




More information about the Digitalmars-d mailing list