RichThrowable

org.llm4s.error.ThrowableOps.RichThrowable
final implicit class RichThrowable(t: Throwable) extends AnyVal

Enriches Throwable with toLLMError conversion method.

Value parameters

t

The throwable to enrich

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

def toLLMError(implicit em: ErrorMapper): LLMError

Converts this Throwable to an LLMError using the provided error mapper.

Converts this Throwable to an LLMError using the provided error mapper.

Value parameters

em

The error mapper to use (defaults to DefaultErrorMapper)

Attributes

Returns

An appropriate LLMError subtype based on the exception type