userr
userr¶
Error-reporting module
This implements a union-based result type similar to https://github.com/rustedpy/result/, except that we do not wrap the “good” result.
The type Res
contains either a value of a user-defined type _Value_co
, an error
or a list of errors.
Errors have an associated context, see the description for Err1
.
Types
- Res¶
- _Value_co¶
OK Value in our custom result type
- _Parameters¶
Parameter specification for a decorated function
- _ReturnType¶
Return type for a decorated function
- _U¶
Generic type
- _V¶
Generic type
- _W¶
Generic type
Functions
Collects single results of various types into a tuple result |
|
Collects a sequence of results |
|
Enables the chaining computations that can error |
|
Adds context to an error contained in a result type (when applicable) |
|
Enables a computation on the value of a result |
|
Decorates the given function, and wraps thrown exceptions into an error result |
Classes
Describes either an error or a list of errors |
|
Describes a single error |
|
Error class that regroups several errors |