pub enum Error {
Parse(String),
ParseAt {
message: String,
line: usize,
column: usize,
},
Execution(String),
Io(Error),
CommandNotFound(String),
ResourceLimit(LimitExceeded),
Network(String),
Internal(String),
}Expand description
Bashkit error types.
All error messages are designed to be safe for display to end users without exposing internal details or sensitive information.
Variants§
Parse(String)
Parse error occurred while parsing the script (without location info).
ParseAt
Parse error with source location information.
Execution(String)
Execution error occurred while running the script.
Io(Error)
I/O error from filesystem operations.
CommandNotFound(String)
Command not found.
ResourceLimit(LimitExceeded)
Resource limit exceeded.
Network(String)
Network error.
Internal(String)
Internal error for unexpected failures.
THREAT[TM-INT-002]: Unexpected internal failures should not crash the interpreter. This error type provides a human-readable message without exposing:
- Stack traces
- Memory addresses
- Internal file paths
- Panic messages that may contain sensitive data
Use this for:
- Recovered panics that need to abort execution
- Logic errors that indicate a bug
- Security-sensitive failures where details should not be exposed
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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<LimitExceeded> for Error
impl From<LimitExceeded> for Error
Source§fn from(source: LimitExceeded) -> Self
fn from(source: LimitExceeded) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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