baml.errors.UnknownError
Universal wrapper for errors that do not implement a known capability channel.
Reference version
Signature
class baml.errors.UnknownErrorUniversal wrapper for errors that do not implement a known capability channel.
Source:<builtin>/baml/ns_errors/unknown_error.bamlbytes 83–2386
Fields
data
unknownmessage
string[]Static methods
function
_preserve_context
(source: unknown, target: unknown) -> null throws neverfunction
from
<T>(data: unknown) -> T | baml.errors.UnknownError throws neverPreserve 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 neverAs with from, but append a breadcrumb while the value remains
unknown.
Implementations
baml.Concrete for T
Source:<builtin>/baml/core.bamlbytes 747–779
baml.ToString for baml.errors.UnknownError
Instance methods
function
to_string
(self) -> string throws neverSource:<builtin>/baml/ns_errors/unknown_error.bamlbytes 2043–2384