Expand description
Unified error causality chains across Rust and Python using PyErrChain
.
Structs§
- Downcast
ToPy Err - Try to map a
std::error::Error
via a specific error typeT
to aPyErr
by downcasting when used asMapErrorToPyErr
; - Error
NoPy Err - Never attempt to translate any
std::error::Error
toPyErr
when used asAnyErrorToPyErr
. - IoError
ToPy Err - Translate
std::io::Error
toPyErr
when used asAnyErrorToPyErr
. - PyErr
Chain PyErrChain
wraps aPyErr
together with its causality chain.
Traits§
- AnyError
ToPy Err - Utility trait to try to translate from
std::error::Error
toPyErr
. - MapError
ToPy Err - Utility trait to try to translate via specific error types
E
implementingstd::error::Error
and wrapped errors such asMyError<E>
toPyErr
s.
Functions§
- err_
with_ location - Utility function to add a traceback with the error’s
file
,line
, andcolumn
location information to theerr
.