pub enum RustBashError {
Parse(String),
Execution(String),
ExpansionError {
message: String,
exit_code: i32,
should_exit: bool,
},
FailGlob {
pattern: String,
},
RedirectFailed(String),
LimitExceeded {
limit_name: &'static str,
limit_value: usize,
actual_value: usize,
},
Network(String),
Vfs(VfsError),
Timeout,
}Expand description
Top-level error type for the rust-bash interpreter.
Variants§
Parse(String)
Execution(String)
ExpansionError
An expansion-time error that aborts the current command and sets the
exit code. When should_exit is true the script also terminates
(used by ${var:?msg}). When false, only the current command is
aborted (used for e.g. negative substring length).
FailGlob
A failglob error: no glob matches found when shopt -s failglob is on.
Aborts the current simple command (exit code 1) but does NOT exit the script.
RedirectFailed(String)
A redirect failure (e.g. nonexistent input file, empty filename). Aborts the current command with exit code 1, reports error on stderr, but does NOT exit the script.
LimitExceeded
Network(String)
Vfs(VfsError)
Timeout
Trait Implementations§
Source§impl Debug for RustBashError
impl Debug for RustBashError
Source§impl Display for RustBashError
impl Display for RustBashError
Source§impl Error for RustBashError
impl Error for RustBashError
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 Freeze for RustBashError
impl RefUnwindSafe for RustBashError
impl Send for RustBashError
impl Sync for RustBashError
impl Unpin for RustBashError
impl UnsafeUnpin for RustBashError
impl UnwindSafe for RustBashError
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