"bearophile" <[email protected]> wrote in message news:[email protected]... > 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? > > void foo() { > auto e = new Exception(""); // instantiation line number here > throw e; > } > void main() { > foo(); > } > > Exceptions get caught, rethrown, stored, etc. But in many cases in my code > they are instantiated close to where the cause was. So knowing such line > number can be useful (if you are using a debugger this is not so useful). > > Bye, > bearophile
Doesn't tango's exception tracing do that?
