AIAgentError

constructor(throwable: Throwable)(source)

Secondary constructor that allows creating an instance of the class using a Throwable.

Parameters

throwable

The Throwable from which the error message, stack trace, and cause will be retrieved. The error message is derived from throwable.message, defaulting to "Unknown error" if null. The stack trace is converted to a string using throwable.stackTraceToString(). The cause is determined from throwable.cause, and its stack trace is converted to a string if not null.