pub enum CoreError {
User(String),
TestFailure(String),
System {
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
}Expand description
Core error taxonomy, categorized by fault (ADR-0009).
Variants§
User(String)
The user’s input is at fault → exit code 2.
TestFailure(String)
A test genuinely failed → exit code 1.
System
The environment or proef itself is at fault → exit code 3.
Implementations§
Source§impl CoreError
impl CoreError
Sourcepub fn test_failure(message: impl Into<String>) -> Self
pub fn test_failure(message: impl Into<String>) -> Self
A test-failure error (exit 1).
Sourcepub fn system(message: impl Into<String>) -> Self
pub fn system(message: impl Into<String>) -> Self
A system-fault error (exit 3) without an underlying cause.
Trait Implementations§
Source§impl Error for CoreError
impl Error for CoreError
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()
Source§impl From<CoreError> for FrontError
impl From<CoreError> for FrontError
Source§impl From<EngineError> for CoreError
impl From<EngineError> for CoreError
Source§fn from(err: EngineError) -> Self
fn from(err: EngineError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for CoreError
impl !UnwindSafe for CoreError
impl Freeze for CoreError
impl Send for CoreError
impl Sync for CoreError
impl Unpin for CoreError
impl UnsafeUnpin for CoreError
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