pub enum ClmError {
Show 13 variants
Storage(StorageErrorCode, String),
Cpn(CpnErrorCode, String),
Auth(AuthErrorCode, String),
Transport(TransportErrorCode, String),
Evaluator(EvaluatorErrorCode, String),
Manifest(ManifestErrorCode, String),
Crypto(CryptoErrorCode, String),
Crdt(CrdtErrorCode, String),
Evaluation(String),
YamlParse(Error),
Json(Error),
Io(Error),
Database(Error),
}Expand description
Core Domain Error Hierarchy for CLM Kernel.
Implements structured domain errors with explicit error codes, domain categorizations, Satori/JSON-RPC serialization, and PTR Fiber failure modes.
Variants§
Storage(StorageErrorCode, String)
Cpn(CpnErrorCode, String)
Auth(AuthErrorCode, String)
Transport(TransportErrorCode, String)
Evaluator(EvaluatorErrorCode, String)
Manifest(ManifestErrorCode, String)
Crypto(CryptoErrorCode, String)
Crdt(CrdtErrorCode, String)
Evaluation(String)
YamlParse(Error)
Json(Error)
Io(Error)
Database(Error)
Implementations§
Source§impl ClmError
impl ClmError
pub fn storage(code: StorageErrorCode, msg: impl Into<String>) -> Self
pub fn cpn(code: CpnErrorCode, msg: impl Into<String>) -> Self
pub fn auth(code: AuthErrorCode, msg: impl Into<String>) -> Self
pub fn transport(code: TransportErrorCode, msg: impl Into<String>) -> Self
pub fn evaluator(code: EvaluatorErrorCode, msg: impl Into<String>) -> Self
pub fn fiber(err: FiberError) -> Self
pub fn manifest(code: ManifestErrorCode, msg: impl Into<String>) -> Self
pub fn crypto(code: CryptoErrorCode, msg: impl Into<String>) -> Self
pub fn crdt(code: CrdtErrorCode, msg: impl Into<String>) -> Self
Sourcepub fn to_exit_code(&self) -> i32
pub fn to_exit_code(&self) -> i32
Maps errors to process exit codes.
Sourcepub fn to_payload(&self) -> Value
pub fn to_payload(&self) -> Value
Serializes error to a structured JSON-RPC / Satori protocol payload.
Trait Implementations§
Source§impl Error for ClmError
impl Error for ClmError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for ClmError
impl !UnwindSafe for ClmError
impl Freeze for ClmError
impl Send for ClmError
impl Sync for ClmError
impl Unpin for ClmError
impl UnsafeUnpin for ClmError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more