data CallDetails
A typed error detail of a failed call: the name of the error type and its encoded value.
Example:
use std.rpc { callDetails }
@error data Missing { what: str }
service S {
@public rpc find() -> i32 | Missing
}
impl S {
rpc find() { fail Missing{ what: "x" } }
}
fn main() io, net {
let d = callDetails(S, "find", b"")
print(d.type)
}Output
Missing
pub(api) data CallDetailsSince. 1.0.0-beta
Fields
pub(api) type: str | Name of the error type; empty when there is none. |
pub(api) value: bytes | The encoded error value. |
Defined in: std/rpc/rpc.oxl:173