baml.regex.Error

A pattern that could not be compiled.

Reference version

Signature

class baml.regex.Error

A pattern that could not be compiled.

Thrown only by new. Matching an existing Regex never throws a regex error.

Source:<builtin>/baml/ns_regex/regex.bamlbytes 2885–3437

Fields

kind

baml.regex.ErrorKind

For portable handling: Unsupported is a valid pattern outside the selected dialect, Syntax is a malformed one.

message

string

Human-readable description, including the engine's own diagnostic.

pattern

string

The pattern as it was passed to new.

span_start

int | null

Codepoint offset into pattern where the problem starts, when the engine reports one.

span_end

int | null

Codepoint offset one past the problem, when the engine reports one.

Implementations

baml.Concrete for T

Static methods

function

type

() -> reflect.Type throws never

This type's runtime type value: int.type() is the same value as reflect.Type.of<int>().

Spell it on a declared type written as one name, optionally qualified or with generic arguments: Foo.type(), root.models.Base.type(), Box<int[]>.type(). Array, optional, union, map and function types, interfaces, and generic type parameters keep the reflect.Type.of<T>() form. A type that declares its own type member keeps resolving to it.

Source:<builtin>/baml/core.bamlbytes 1360–1392