These are chat archives for symengine/symengine

17th
Aug 2015
Isuru Fernando
@isuruf
Aug 17 2015 10:59
@certik, how do you get the stacktrace of an exception that was caught? Is it possible?
Ralf Stephan
@rwst
Aug 17 2015 13:28
@isuruf (gdb) help catch?
Isuru Fernando
@isuruf
Aug 17 2015 14:04
@rwst, I was referring to getting teuchos stacktraces (https://github.com/sympy/symengine/blob/master/symengine/teuchos/Teuchos_stacktrace.hpp) work with the testing framework that we use. (https://github.com/sympy/symengine/tree/master/symengine/catch)
Ondřej Čertík
@certik
Aug 17 2015 18:20
@isuruf just call the stacktrace function, just like you do for abort.
and for exception it has to be called at the point of the exception I think, which is tricky. But I thought it was working before using catch. Was it because if exception gets uncaught, the stacktrace is set for where the exception was raised?
So perhaps we can just remove the custom abort/exception handler in catch?
But we want Catch to do the accounting which tests fail/succeed.
Ondřej Čertík
@certik
Aug 17 2015 19:03
Perhaps easier is to disable exception catching in Catch. Perhaps based on some command line option. Then we can have it turned off on Travis, so that we can read the stack trace if it happens.
When people run it by hand, they can choose if they want a nice stacktrace, or rather a summary from Catch (but no stacktrace)