[−]Attribute Macro fehler::throws
#[throws]
Annotations a function that "throws" a Result.
Inside functions tagged with throws
, you can use ?
and the throw!
macro to return errors,
but you don't need to wrap the successful return values in Ok
.
throws
can optionally take a type as an argument, which will be the error type returned by
this function. By default, the function will throw Exception
.