You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to error-stack its easy to simply change the context and propagate errors without much effort, but this definitely reduces the quality of the error propagation as there is no strict standard that the errors need to adhere to.
This issue addresses this discussing upon a more standardized way of handling error removing change_context from the code based promoting a more declarative way of error handling instead of the current imperative way.
Possible Approaches
Wrap the current error into a custom defined struct, create a specific context for all the layers/APIs and then define TryFrom implementation for them, internally handling the change contexts
The text was updated successfully, but these errors were encountered:
Description
Due to
error-stack
its easy to simply change the context and propagate errors without much effort, but this definitely reduces the quality of the error propagation as there is no strict standard that the errors need to adhere to.This issue addresses this discussing upon a more standardized way of handling error removing
change_context
from the code based promoting a more declarative way of error handling instead of the current imperative way.Possible Approaches
TryFrom
implementation for them, internally handling the change contextsThe text was updated successfully, but these errors were encountered: