Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Util::BacktraceException wrapper #225

Merged
merged 3 commits into from
Aug 19, 2024

Conversation

ksedgwic
Copy link
Collaborator

@ksedgwic ksedgwic commented Jul 28, 2024

Abstract

Added Util::BacktraceException which captures backtraces where an exception is thrown and then formats them for debugging when they are displayed with what(). The backtraces are more useful if the following configuration is used: ./configure CXXFLAGS="-g -Og" but this results in larger, less optimized binaries.

Motivation

When an unexpected exception occurs on a user's machine we typically get a very terse "parse error" or similar message. This PR adds logging of the stack backtrace where the exception was encountered, greatly increasing the likelihood of finding the problem from the reported log alone.

@ksedgwic ksedgwic mentioned this pull request Jul 28, 2024
3 tasks
@ksedgwic ksedgwic force-pushed the 2024-07-exception-backtrace branch from 1ba2052 to b8da967 Compare August 8, 2024 21:26
@ksedgwic ksedgwic marked this pull request as ready for review August 8, 2024 21:52
@ksedgwic ksedgwic force-pushed the 2024-07-exception-backtrace branch from b8da967 to 7e4f070 Compare August 9, 2024 20:13
Copy link
Contributor

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 7e4f070

@ksedgwic ksedgwic merged commit 4a2ea4a into ZmnSCPxj:master Aug 19, 2024
1 check passed
@ksedgwic ksedgwic mentioned this pull request Sep 25, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants