Exceptions
NAME
LLM::Data::Pipeline::Exceptions - typed failures thrown by the pipeline Runner
DESCRIPTION
X::LLM::Data::Pipeline::StepExhausted is thrown by
LLM::Data::Pipeline::Runner when a plain step's retry budget
(LLM::Data::Pipeline::RetryPolicy) is spent without a successful attempt. It
carries the step name, the number of attempts made, and the last-error ā the
actual exception from the final attempt ā so callers can inspect (or rethrow)
the underlying cause while still catching a Pipeline-typed failure. Its
message quotes the last error, so string-matching callers keep working.
Only thrown when retry is opted into (max-attempts greater than 1). With
the default single-attempt policy the Runner rethrows the step's original
exception unchanged, preserving the pre-0.3.0 contract that domain exception
types (e.g. X::LLM::Data::Inference::Exhausted) flow straight out to callers.
The remaining classes are declared now and thrown from later releases:
X::LLM::Data::Pipeline::Cancelledā cooperative cancellation (from 0.4.0).X::LLM::Data::Pipeline::ItemsDeadā afail-on-deaditem step finished with dead items (from 0.4.0).X::LLM::Data::Pipeline::CheckpointDriftā a resumed in-progress item step no longer matches its recorded fingerprint (from 0.4.0).
EXAMPLES
use LLM::Data::Pipeline::Runner;
use LLM::Data::Pipeline::Exceptions;
my $runner = LLM::Data::Pipeline::Runner.new(
step-retry => LLM::Data::Pipeline::RetryPolicy.new(:max-attempts(3)),
);
{
CATCH {
when X::LLM::Data::Pipeline::StepExhausted {
note "step {.step} gave up after {.attempts} tries";
note "underlying cause: {.last-error.^name}: {.last-error.message}";
}
}
$runner.run($plan, $ctx);
}