OxL Reference

data ParseError

str.parse<T>() failed: the text is not a valid T (D-805).

Example:

oxl✓ checked in CI
fn main() io {
  match "12x".parseInt() {
    i64 n => print("{n}")
    ParseError e => print("not a number")
  }
}
Output
not a number
@error pub(api) data ParseError

Since. 1.0.0-beta

Fields

pub(api) msg: str = ""

What was wrong with the text.

Defined in: std/core/types.oxl:1177

See also