pub struct DoCatchBuilder { /* private fields */ }Expand description
Builder for a .do_catch_exception() / .do_catch_when() / .do_catch_all() clause.
Implementations§
Source§impl DoCatchBuilder
impl DoCatchBuilder
Sourcepub fn process(self, processor: BoxProcessor) -> Self
pub fn process(self, processor: BoxProcessor) -> Self
Add a step to the catch clause’s sub-pipeline.
Sourcepub fn on_when(self, predicate: FilterPredicate) -> Self
pub fn on_when(self, predicate: FilterPredicate) -> Self
Set an additional predicate that must also match for this catch clause to fire.
Sourcepub fn disposition(self, value: ExceptionDisposition) -> Self
pub fn disposition(self, value: ExceptionDisposition) -> Self
Set the disposition for this catch clause.
§Panics
Panics if value is ExceptionDisposition::Continued, which is not
supported in doTry MVP (spec §3).
Sourcepub fn handled(self) -> Self
pub fn handled(self) -> Self
Sugar for disposition(ExceptionDisposition::Handled).
The caught error is marked handled and the catch clause’s exchange becomes the final result (no re-throw).
Sourcepub fn propagate(self) -> Self
pub fn propagate(self) -> Self
Sugar for disposition(ExceptionDisposition::Propagate).
The catch clause runs for side-effects and the original error is re-thrown.
Note: .continued() is intentionally NOT provided — Continued is
rejected at parse time for doTry MVP per spec §3 (semantically
ambiguous at catch-clause scope).
Sourcepub fn end_do_catch(self) -> DoTryBuilder
pub fn end_do_catch(self) -> DoTryBuilder
Close the catch clause and return the parent DoTryBuilder.