OxL Reference

method Span.setError

Marks the span as failed (status ERROR) with a message.

Example:

oxl✓ checked in CI
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) io

Since. 1.0.0-beta

Parameters

NameType
msgstr

Effects

io

Defined in: std/obs/obs.oxl:369

See also