Add backtrace to logged exception#5047
Merged
boegel merged 6 commits intoeasybuilders:developfrom Dec 3, 2025
Merged
Conversation
Member
|
@Flamefire Is there any reasonable way we can come up with a test that verifies that this is working as intended? |
`caller_info` will return the direct caller which is not useful in this case as every log will look like: > build_log.py:226 ERROR EasyBuild encountered an error (at easybuild/base/exceptions.py:126 in __init__): [...]
9f0f935 to
91252e1
Compare
Contributor
Author
|
A bit tricky because the call stack is limitted to things from the easybuild package and the test is a separate package. But found something reasonable. Don't mind the force-push, I only had to fixup the 2nd-last of the new commit. It is still only the 4 commits added since your last review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(created using
eb --new-pr)This improves debugging issues/crashes as it not only includes the location of the error but also the backtrace.
This is especially useful for very generic errors like the template-resolving failure where it would be important to know where exactly it failed to resolve and not the location of the error (inside the
resolvefunction)The log now looks like this:
"Callstack" because the most recent call is at the top