type NetError
The errors every rpc, actor message and cluster call can return in addition to its own: Timeout, Unavailable, Cancelled, AccessDenied and ProtocolError (§6.5).
Example:
fn describe(e: NetError) -> str {
match e {
Timeout _ => "too slow"
Unavailable _ => "unreachable"
Cancelled _ => "cancelled"
AccessDenied _ => "not allowed"
ProtocolError p => "protocol: {p.msg}"
}
}
fn main() io {
print(describe(Timeout{}))
}Output
too slow
pub(api) type NetError = Timeout | Unavailable | Cancelled | AccessDenied | ProtocolErrorSince. 1.0.0-beta
Defined in: std/core/types.oxl:1397