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
Additional error context #2127
Comments
I just found the It adds debug information to error objects when That said, I just tried it and the backtrace dies in the middle of async land:
Perhaps this is an internal error, but I feel like it should say something like "error trying to call |
It looks like there actually is context associated with |
I think I looked into this once, and std actually doesn't provide APIs to keep the context around? |
Oops, my brain purged my cache. I'm trying to remember what I found when I was digging in...
In this case I believe the error conversion path was It looks like the standard library mostly uses But in any case the more context that could be preserved (and possibly supplemented) in |
Is your feature request related to a problem? Please describe.
I'm calling a method in the library and it returns
proto error: io error: invalid input parameter
- AFAICT this is a core io error, and as this is a networking library I believe it's probably making io calls all over the place. I don't have enough details to identify the cause on my own.Describe the solution you'd like
Maybe additional context could be added to the error type? Ex when wrapping IoError a static string describing what was going on at the time. If there's a lot of layers this too might not narrow down the context enough, but it'd be a start...
Since there's a lot of indirection here (resolver layers, pools, etc) I think ideally there'd be that much more context in the error messages.
Obviously performant error handling makes difficult tradeoffs, but right now I think there's too little context in bubbled errors.
Describe alternatives you've considered
Running a debugger. Unfortunately this is in an environment where it's hard to attach a debugger.
Debug-build only print statements? Or something that could be optionally enabled in debug builds? To print out everything it's doing.
The text was updated successfully, but these errors were encountered: