pub enum BspError {
NodeExecutionFailed {
node_id: NodeId,
node_name: String,
message: String,
},
TypeMismatch {
node_id: NodeId,
port_index: PortIndex,
expected: &'static str,
found: &'static str,
},
CycleDetected {
node_id: NodeId,
},
UnconnectedPort {
node_id: NodeId,
port_index: PortIndex,
},
NodeNotFound {
node_id: NodeId,
},
Deadlock,
ValidationError(String),
LoopBoundExceeded {
edge: EdgeId,
from: NodeId,
to: NodeId,
max: u64,
},
TokenLimitExceeded {
edge: EdgeId,
from: NodeId,
to: NodeId,
cap: u64,
},
MaxExecutionsExceeded {
node_id: NodeId,
max: u64,
},
DefError(String),
SuspensionSerde(String),
}Expand description
Standardized error types for the BSP graph compiler and execution runtime.
Variants§
NodeExecutionFailed
TypeMismatch
CycleDetected
UnconnectedPort
NodeNotFound
Deadlock
ValidationError(String)
LoopBoundExceeded
A cycle-closing edge fired more than its configured max_iterations budget.
This is the per-edge circuit breaker for control-flow loops: every edge that closes a
cycle should carry a max_iterations cap, and exceeding it aborts the run loudly
instead of looping forever.
TokenLimitExceeded
A single edge accumulated more pending (unconsumed) activation tokens than allowed.
Guards against unbounded memory growth when a misconfigured loop re-queues tokens faster than the target node consumes them.
MaxExecutionsExceeded
A node was executed more times than its configured max_executions budget.
Useful as a circuit breaker for poll-until style nodes that must not run forever.
DefError(String)
A graph definition (GraphDef) could not be parsed or instantiated.
Unknown node type_names, condition names, and merger names are reported through
BspError::ValidationError instead (registry completeness is a validation concern);
this variant covers structural definition faults such as an unsupported version.
SuspensionSerde(String)
Serializing or deserializing a super::run::SuspendedExecution snapshot failed.
Trait Implementations§
Source§impl Error for BspError
impl Error for BspError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()