
"Atry" <pop.atry@gmail.com> wrote in message news:4638E19D.7080408@gmail.com...
Michael Gopshtein ??:
Just dump the stack at the exception's constructor. _______________________________________________
Yes, that's what Pavel Antokolsky has suggested too. I agree that it can be a good solution. The only limitation - you have to make sure all exceptions are derived from some special class, which is not possible for exceptions thrown from 3rd party libraries.
Try to catch the exception thrown from 3rd party libraries, and throw another one.
Sure, but I didn't mean it's impossible, the whole intend is making the process easier. When in many places in the code you call external functions, you will need to have try-cach block in lot of functions. Sometimes you do want to catch specific types of exceptions, and to handle them properly. But if all you want is printing a stack trace when exception occurs, you'd ideally have single try-catch block in the 1st frame of each thread. Using custom stack trace, which remembers "history" of recent calls makes it possible.