Package com.tnsai.tools.spi
Class ToolUnexpectedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.tnsai.exceptions.TnsAIException
com.tnsai.tools.spi.ToolException
com.tnsai.tools.spi.ToolUnexpectedException
- All Implemented Interfaces:
Serializable
Catchall for tool failures that don't fit any other typed subclass —
a pure
RuntimeException thrown from inside the tool, an
AssertionError, or anything else escaping the well-defined
failure taxonomy. Marked non-retryable by default because retry-safety
cannot be reasoned about; the resilience layer can opt back in
explicitly via @Resilience.retryOn(ToolUnexpectedException.class).
Used by the framework's ErrorEmitter when wrapping an
unrecognized Throwable from a tool, so every failure flows
through the typed hierarchy rather than as raw Exception.
- Since:
- 0.5.0 (issue #88)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.tnsai.tools.spi.ToolException
ToolException.Builder, ToolException.ErrorType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the error code for this exception type.Methods inherited from class com.tnsai.tools.spi.ToolException
apiError, builder, configurationError, getAttribute, getAttributes, getDetailedMessage, getErrorType, getHttpStatusCode, getQuery, getTimestamp, getToolName, isRetryable, networkError, parseError, timeout, toString, validationErrorMethods inherited from class com.tnsai.exceptions.TnsAIException
getContext, getMaxRetryAttempts, getMessage, getSuggestedRetryDelayMs, getThrownAt, wrapMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
ToolUnexpectedException
-
-
Method Details
-
getErrorCode
Description copied from class:TnsAIExceptionGets the error code for this exception type. Format: TNSAI-XXX where XXX is derived from class name.- Overrides:
getErrorCodein classTnsAIException
-