Package com.tnsai.rag
Class RetrievalException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.tnsai.rag.RetrievalException
- All Implemented Interfaces:
Serializable
Typed failure raised by the common retrieval runtime.
Cooperative caller cancellation remains represented by
CancellationException; it is intentionally
not wrapped as a retrieval failure. Cancellation sits outside this
taxonomy entirely: it is caller intent, propagates unconditionally, and is
never absorbed by a failure policy.
Every failure carries a RetrievalException.Reason, and
RetrievalException.Reason.surfacesAboveFailurePolicy() decides whether an entry point
may route it through @Search.onFailure. Callers must branch on
that predicate rather than on the exception type, because declaration and
transport faults share this one class.
- Since:
- 0.13.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumStable failure categories shared by chat and action entry points. -
Constructor Summary
ConstructorsConstructorDescriptionRetrievalException(RetrievalException.Reason reason, String message) Creates a retrieval failure without an underlying cause.RetrievalException(RetrievalException.Reason reason, String message, Throwable cause) Creates a retrieval failure with its underlying cause. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RetrievalException
Creates a retrieval failure without an underlying cause.- Parameters:
reason- stable failure categorymessage- failure detail
-
RetrievalException
Creates a retrieval failure with its underlying cause.- Parameters:
reason- stable failure categorymessage- failure detailcause- original failure
-
-
Method Details
-
reason
Returns the stable failure category.- Returns:
- failure category
-