You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Log explanatory string of std::exception when logging uncaught C++ exceptions #860
When an unhandled C++ exception is logged, it would in some cases be very helpful to also see the exception message returned by std::exception::what().
Would it be possible for Sentry in its exception handler to check the exception type, and if it’s of type std::exception log its explanatory string as the error message?
Hi @triplef, the best way to achieve this is to implement a terminate_handler in the SDK and allow users to enable it via the options. This is a C++-specific handler where we can be sure that we are processing a C++ exception instead of any abort() (which the default terminate_handler uses to close the program).
It should be relatively easy to implement this for the inproc backend (I guess you are asking for Android?). I would love to have this in all backends, but we can start with one. I'll look into it, but I can't promise how soon we'll tackle this.
Sounds great, thank you @supervacuus! We'd be interested in this on Android and Windows (particularly on Windows as we have more 3rd party C++ code there which might throw exceptions like that).
Activity
supervacuus commentedon Jul 1, 2023
Hi @triplef, the best way to achieve this is to implement a
terminate_handlerin the SDK and allow users to enable it via the options. This is a C++-specific handler where we can be sure that we are processing a C++ exception instead of anyabort()(which the defaultterminate_handleruses to close the program).It should be relatively easy to implement this for the
inprocbackend (I guess you are asking for Android?). I would love to have this in all backends, but we can start with one. I'll look into it, but I can't promise how soon we'll tackle this.triplef commentedon Jul 1, 2023
Sounds great, thank you @supervacuus! We'd be interested in this on Android and Windows (particularly on Windows as we have more 3rd party C++ code there which might throw exceptions like that).
triplef commentedon Oct 24, 2023
If we implemented this on the app side would something like this work?
42 remaining items
feat: C++ integration
feat: C++ integration
feat: C++ integration
feat: C++ integration
feat: C++ integration
feat: C++ integration