baml.errors.UnknownError

Universal wrapper for errors that do not implement a known capability channel.

Reference version

Signature

class baml.errors.UnknownError

Universal wrapper for errors that do not implement a known capability channel.

Source:<builtin>/baml/ns_errors/unknown_error.bamlbytes 832386

Fields

data

unknown

message

string[]

Static methods

function

_preserve_context

(source: unknown, target: unknown) -> null throws never
function

from

<T>(data: unknown) -> T | baml.errors.UnknownError throws never

Preserve a known T, recover a wrapped T, pass an existing UnknownError through, or wrap an otherwise unknown value.

function

with_message

<T>(data: unknown, message: string) -> T | baml.errors.UnknownError throws never

As with from, but append a breadcrumb while the value remains unknown.

Implementations

baml.Concrete for T

Source:<builtin>/baml/core.bamlbytes 747779

baml.ToString for baml.errors.UnknownError

Instance methods

function

to_string

(self) -> string throws never

Source:<builtin>/baml/ns_errors/unknown_error.bamlbytes 20432384