Package com.tnsai.actions.contracts
Class ContractViolationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.tnsai.actions.contracts.ContractViolationException
- All Implemented Interfaces:
Serializable
Thrown when a
@Contract precondition, postcondition, or invariant is
violated at runtime (TNS-552).
Carries the expression that failed and the
kind of clause, so ActionExecutor can surface
an LLM-friendly message ("precondition violated: amount > 0") that the
model can act on and retry. The bindings snapshot is kept
for debugging (it is transient — not part of the serialized form).
- Since:
- 0.11.0
- Author:
- TnsAI Team
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ContractViolationException
-
-
Method Details
-
getContractKind
-
getViolatedExpression
-
getBindings
-