Add backtrace to Error constructor #309
Labels
No labels
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/store
bug
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
RFD
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
ux
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#309
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It's a pain to try and figure out where a mystery error, like "invalid character in base64 string:" comes from. This could be made much more simple by extracting a stacktrace whenever an error is constructed, and printing it out, along with the actual error message.
Shouldn't be hard; we did this for HintFmt:
std::cerr << boost::stacktrace::stacktrace() << std::endl;
Though if we're going to make more regular use of backtraces we may want to use something like https://github.com/jeremy-rifkin/cpptrace
an alternative i found is using std::source_location in a default of an argument of the constructor to do the equivalent of rust's
#[track_caller]
: very cheap at runtimeand this may be important for cases where we are abusing exceptions for control flow? unsure.