Class ToolUnexpectedException

All Implemented Interfaces:
Serializable

public class ToolUnexpectedException extends ToolException
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:
  • Constructor Details

    • ToolUnexpectedException

      public ToolUnexpectedException(String toolName, String message, Throwable cause)
  • Method Details

    • getErrorCode

      public String getErrorCode()
      Description copied from class: TnsAIException
      Gets the error code for this exception type. Format: TNSAI-XXX where XXX is derived from class name.
      Overrides:
      getErrorCode in class TnsAIException