pub enum OmegaError {
ConstraintViolation(String),
SandboxRejection(String),
ExecutionBlocked(String),
Memory(String),
Persist(String),
StepNotExecuted {
step_id: Uuid,
reason: String,
},
StepExecutionOutcomeUnknown {
step_id: Uuid,
reason: String,
},
StepCommitIncomplete {
step_id: Uuid,
stage: String,
},
StepAlreadyCommitted {
step_id: Uuid,
},
StepIdConflict {
step_id: Uuid,
},
Config(String),
Other(Error),
}Expand description
Error returned by the kernel’s public operations.
The type implements std::error::Error when the std feature is enabled; its Display
implementation is also available in no_std builds.
§Examples
use omega_cognitive_kernel::OmegaError;
let error = OmegaError::ConstraintViolation("risk limit exceeded".into());
assert_eq!(error.to_string(), "Constraint violation: risk limit exceeded");
assert!(matches!(error, OmegaError::ConstraintViolation(_)));Variants§
ConstraintViolation(String)
A requested operation violated a kernel constraint.
SandboxRejection(String)
A proposed action or patch was rejected by sandbox validation.
ExecutionBlocked(String)
Execution was blocked by policy or authorization.
Memory(String)
A memory operation failed.
Persist(String)
Loading or persisting kernel state failed.
StepNotExecuted
The step was not executed.
StepExecutionOutcomeUnknown
The step may have caused external effects, but its execution result is unknown.
Fields
StepCommitIncomplete
Step execution completed, but committing its state did not finish.
Fields
StepAlreadyCommitted
The step identifier was already committed, so the duplicate was not executed.
StepIdConflict
The step identifier was previously used with a different goal.
Config(String)
Kernel configuration was invalid or could not be loaded.
Other(Error)
An underlying error that does not have a more specific kernel variant.
Trait Implementations§
Source§impl Debug for OmegaError
impl Debug for OmegaError
Source§impl Display for OmegaError
impl Display for OmegaError
Source§impl Error for OmegaError
Available on crate feature std only.
impl Error for OmegaError
std only.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()