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
For a certain set of errors, specifically ErrorCodes:
Crypto
TLSStack
BtpError
MdnsError
NoNetworkInterface (we should actually rename this to NetworkError)
StdIoError
maybe a few more...?
... we should:
Always grab the original backtrace (if feature backtrace is enabled)
... and keep the original error as a Box<dyn Error> (if feature std is enabled, and also in future if feature alloc is enabled given that ). Note that we currently preserve the original error only if BOTH std and backtrace are enabled, which is probably a bit too paranoid
Log the original error with error! otherwise
... to get extra context for debugging. Because these errors are:
Wrappers for lower-level errors in their respective stacks
We need extra info what happened for debugging
The cost of preserving the original error should not be that high as we don't expect these errors to happen frequently, but unfortunately we can only due it in the presence of alloc. Without alloc, preserving the original errors means generics which will virally pollute all our APIs which is just plain impossible to handle.
We might even decide to model these errors in a different way from the rest. To be decided.
The text was updated successfully, but these errors were encountered:
For a certain set of errors, specifically
ErrorCode
s:Crypto
TLSStack
BtpError
MdnsError
NoNetworkInterface
(we should actually rename this toNetworkError
)StdIoError
... we should:
backtrace
is enabled)Box<dyn Error>
(if featurestd
is enabled, and also in future if featurealloc
is enabled given that ). Note that we currently preserve the original error only if BOTHstd
andbacktrace
are enabled, which is probably a bit too paranoiderror!
otherwise... to get extra context for debugging. Because these errors are:
The cost of preserving the original error should not be that high as we don't expect these errors to happen frequently, but unfortunately we can only due it in the presence of
alloc
. Withoutalloc
, preserving the original errors means generics which will virally pollute all our APIs which is just plain impossible to handle.We might even decide to model these errors in a different way from the rest. To be decided.
The text was updated successfully, but these errors were encountered: