-
Notifications
You must be signed in to change notification settings - Fork 697
How to check if an error is wrapped or is original #210
Comments
If you had that method, what would that enable you to do? Why is it important for your program to be able to detect if an error value wraps another? |
If I had the method, I could differentiate wrapped errors with call stack information and original errors without call stack information. For original errors I could add some call stack information by myself. |
For wrapped errors, I think there is no need to wrap it again when wrapping error from other's source. |
In general, either a source should guarantee that all of its errors are wrapped, or none of them are.
|
Thank you for your detailed answer. For some reasons, I have to work with such a broken design from legacy source. |
Tech Debt… we meet again old friend… |
Need method to check if error is wrapped
The text was updated successfully, but these errors were encountered: