-
Notifications
You must be signed in to change notification settings - Fork 24
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 more context to errors #266
Labels
Comments
d-e-s-o
added
help wanted
Extra attention is needed
good first issue
Good for newcomers
labels
Jul 21, 2023
danielocfb
pushed a commit
that referenced
this issue
Jul 25, 2023
Annotate a few error paths with additional information that can be useful in understanding failures. Refs: #266 Signed-off-by: Daniel Müller <deso@posteo.net>
d-e-s-o
added a commit
to d-e-s-o/blazesym
that referenced
this issue
Dec 2, 2023
This change adds context to two more error paths in an attempt to improve error reporting. Refs: libbpf#266 Signed-off-by: Daniel Müller <deso@posteo.net>
d-e-s-o
added a commit
to d-e-s-o/blazesym
that referenced
this issue
Dec 4, 2023
This change adds context to two more error paths in an attempt to improve error reporting. Refs: libbpf#266 Signed-off-by: Daniel Müller <deso@posteo.net>
danielocfb
pushed a commit
that referenced
this issue
Dec 4, 2023
This change adds context to two more error paths in an attempt to improve error reporting. Refs: #266 Signed-off-by: Daniel Müller <deso@posteo.net>
I added some more context over time, whenever I felt it was not sufficient. Probably does no longer make sense to have a dedicated task open. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With df959af we have a custom error type that allows for additional context to be provided by the library (e.g., on top of system errors such as
ENOENT
). We should make use of this capability to improve the quality of error messages in general. Basically, when there is a reason to believe that a low-level error is not particularly useful without context, add some viaErrorExt::context
orErrorExt::with_context
. Here is an example:blazesym/src/dwarf/units.rs
Lines 89 to 94 in cd6456c
On this path it would probably make sense to add further context higher up the stack so that users know exactly which DWARF file the error occurred on.
Among other things, doing so could help with error reports such as:
This task is a good opportunity to become familiar with the code base and it can be done in stages (every improvement helps).
The text was updated successfully, but these errors were encountered: