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
- 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
Description
Due to
error-stackits 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_contextfrom the code based promoting a more declarative way of error handling instead of the current imperative way.Possible Approaches
TryFromimplementation for them, internally handling the change contexts