This repository was archived by the owner on Dec 1, 2021. It is now read-only.
This repository was archived by the owner on Dec 1, 2021. It is now read-only.
Why call callers() on every wrap? #75
Open
Description
Every time an error is wrapped, callers() is called. This seems wasteful to me. I think the root error's stack trace is the most important and almost always what I want.
I think if the error that is being wrapped implements stackTrace interface
, that error's stack trace should be used instead, and the call to callers() can be skipped. For sure, any stack traces in errors between the top and bottom of the error stack are ignored.
I think my optimal format message would include the wrapped msg's all down the various error wraps with a stack trace at the bottom.
Metadata
Metadata
Assignees
Labels
No labels