ThrowableOps
org.llm4s.error.ThrowableOps
object ThrowableOps
Extension methods for converting Throwable to domain-specific LLMError types.
Provides a uniform way to convert exceptions into the LLM4S error hierarchy, enabling consistent error handling across the codebase.
Attributes
- Example
-
import org.llm4s.error.ThrowableOps._ val error = new java.net.SocketTimeoutException("timeout").toLLMError // Returns NetworkError("Request timeout", ...) // With custom mapper implicit val mapper: ErrorMapper = customMapper val customError = exception.toLLMError - Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ThrowableOps.type
Members list
In this article