method Span.setError
Marks the span as failed (status ERROR) with a message.
Example:
use std.obs { span }
fn main() io {
let s = span.start("charge")
s.setError("card declined")
s.end()
print("ok")
}Output
ok
pub(api) fn setError(msg: str) ioSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
msg | str |
Effects
io
Defined in: std/obs/obs.oxl:369