Package dyntabs.ai.flow
Class FlowException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
dyntabs.ai.flow.FlowException
- All Implemented Interfaces:
Serializable
Thrown when a step in an
EasyAI.flow() pipeline fails, naming exactly which step it was.
When a FlowStep throws, Flow.run(Object) stops the pipeline and
wraps the original exception in a FlowException whose stepName() tells you where
the line jammed. The original failure is preserved as the cause, so you
lose nothing.
Familiar analogy: a fault ticket on an assembly line that names the station that jammed ("checkStock") and staples the machine's own error report to the back. You do not have to guess which of six stations stopped the line — the ticket says so.
Place in the flow
Flow.run(input)
→ FlowStep.run(ctx) throws → wrapped as new FlowException(stepName, cause)
→ emitter.error(...) → re-thrown to the caller of Flow.run
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFlowException(String stepName, Throwable cause) Creates a flow failure tagged with the failing step's name. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
FlowException
Creates a flow failure tagged with the failing step's name.- Parameters:
stepName- the name of the step that threw (as registered withFlowBuilder.step)cause- the original exception the step threw
-
-
Method Details
-
stepName
Returns the name of the step that failed.Lets a caller branch or report on which step broke without parsing the message — e.g.
catch (FlowException e) { if ("pay".equals(e.stepName())) ... }.- Returns:
- the failing step's name
-