pub enum Error {
Show 54 variants
SetLocalVarOutsideFunction,
TildeWithoutValidHome,
AssigningListToArrayMember,
ConvertingAssociativeArrayToIndexedArray,
ConvertingIndexedArrayToAssociativeArray,
FailedSourcingFile(PathBuf, Box<Error>),
FailedToSendSignal,
CannotAssignToSpecialParameter,
CheckedExpansionError(String),
FunctionNotFound(String),
CommandNotFound(String),
HistoryItemNotFound,
Unimplemented(&'static str),
UnimplementedAndTracked(&'static str, u32),
MissingScope,
NotADirectory(PathBuf),
IsADirectory,
NotArray,
NoCurrentUser,
InvalidRedirection,
RedirectionFailure(String, Error),
EvalError(EvalError),
IntParseError(ParseIntError),
TryIntParseError(TryFromIntError),
FromUtf8Error(FromUtf8Error),
Utf8Error(Utf8Error),
ReadonlyVariable,
InvalidPattern(String),
RegexError(Error),
InvalidRegexError(Error, String),
IoError(Error),
BadSubstitution,
InvalidArguments,
ChildCreationFailure,
FormattingError(Error),
ParseError(ParseError),
WordParseError(WordParseError),
TestCommandParseError(TestCommandParseError),
BindingParseError(BindingParseError),
ThreadingError(JoinError),
InvalidSignal(String),
ErrnoError(Errno),
InvalidUmask,
ProcfsError(ProcError),
OpenFileNotReadable(&'static str),
OpenFileNotWritable(&'static str),
BadFileDescriptor(u32),
PrintfFailure(i32),
PrintfInvalidUsage(String),
Interrupted,
MaxFunctionCallDepthExceeded,
TimeError(SystemTimeError),
ArrayIndexOutOfRange,
UnhandledKeyCode(Vec<u8>),
}
Expand description
Monolithic error type for the shell
Variants§
SetLocalVarOutsideFunction
A local variable was set outside of a function
TildeWithoutValidHome
A tilde expression was used without a valid HOME variable
AssigningListToArrayMember
An attempt was made to assign a list to an array member
ConvertingAssociativeArrayToIndexedArray
An attempt was made to convert an associative array to an indexed array.
ConvertingIndexedArrayToAssociativeArray
An attempt was made to convert an indexed array to an associative array.
FailedSourcingFile(PathBuf, Box<Error>)
An error occurred while sourcing the indicated script file.
FailedToSendSignal
The shell failed to send a signal to a process.
CannotAssignToSpecialParameter
An attempt was made to assign a value to a special parameter.
CheckedExpansionError(String)
Checked expansion error.
FunctionNotFound(String)
A reference was made to an unknown shell function.
CommandNotFound(String)
Command was not found.
HistoryItemNotFound
History item was not found.
Unimplemented(&'static str)
The requested functionality has not yet been implemented in this shell.
UnimplementedAndTracked(&'static str, u32)
The requested functionality has not yet been implemented in this shell; it is tracked in a GitHub issue.
MissingScope
An expected environment scope could not be found.
NotADirectory(PathBuf)
The given path is not a directory.
IsADirectory
The given path is a directory.
NotArray
The given variable is not an array.
NoCurrentUser
The current user could not be determined.
InvalidRedirection
The requested input or output redirection is invalid.
RedirectionFailure(String, Error)
An error occurred while redirecting input or output with the given file.
EvalError(EvalError)
An error occurred evaluating an arithmetic expression.
IntParseError(ParseIntError)
The given string could not be parsed as an integer.
TryIntParseError(TryFromIntError)
The given string could not be parsed as an integer.
FromUtf8Error(FromUtf8Error)
A byte sequence could not be decoded as a valid UTF-8 string.
Utf8Error(Utf8Error)
A byte sequence could not be decoded as a valid UTF-8 string.
ReadonlyVariable
An attempt was made to modify a readonly variable.
InvalidPattern(String)
The indicated pattern is invalid.
RegexError(Error)
A regular expression error occurred
InvalidRegexError(Error, String)
An invalid regular expression was provided.
IoError(Error)
An I/O error occurred.
BadSubstitution
Invalid substitution syntax.
InvalidArguments
Invalid arguments were provided to the command.
ChildCreationFailure
An error occurred while creating a child process.
FormattingError(Error)
An error occurred while formatting a string.
ParseError(ParseError)
An error occurred while parsing.
WordParseError(WordParseError)
An error occurred while parsing a word.
TestCommandParseError(TestCommandParseError)
Unable to parse a test command.
BindingParseError(BindingParseError)
Unable to parse a key binding specification.
ThreadingError(JoinError)
A threading error occurred.
InvalidSignal(String)
An invalid signal was referenced.
ErrnoError(Errno)
A system error occurred.
InvalidUmask
An invalid umask was provided.
ProcfsError(ProcError)
An error occurred reading from procfs.
OpenFileNotReadable(&'static str)
The given open file cannot be read from.
OpenFileNotWritable(&'static str)
The given open file cannot be written to.
BadFileDescriptor(u32)
Bad file descriptor.
PrintfFailure(i32)
Printf failure
PrintfInvalidUsage(String)
Printf invalid usage
Interrupted
Interrupted
MaxFunctionCallDepthExceeded
Maximum function call depth was exceeded.
TimeError(SystemTimeError)
System time error.
ArrayIndexOutOfRange
Array index out of range.
UnhandledKeyCode(Vec<u8>)
Unhandled key code.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<BindingParseError> for Error
impl From<BindingParseError> for Error
Source§fn from(source: BindingParseError) -> Self
fn from(source: BindingParseError) -> Self
Source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
Source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Source§impl From<ParseIntError> for Error
impl From<ParseIntError> for Error
Source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Source§impl From<SystemTimeError> for Error
impl From<SystemTimeError> for Error
Source§fn from(source: SystemTimeError) -> Self
fn from(source: SystemTimeError) -> Self
Source§impl From<TestCommandParseError> for Error
impl From<TestCommandParseError> for Error
Source§fn from(source: TestCommandParseError) -> Self
fn from(source: TestCommandParseError) -> Self
Source§impl From<TryFromIntError> for Error
impl From<TryFromIntError> for Error
Source§fn from(source: TryFromIntError) -> Self
fn from(source: TryFromIntError) -> Self
Source§impl From<WordParseError> for Error
impl From<WordParseError> for Error
Source§fn from(source: WordParseError) -> Self
fn from(source: WordParseError) -> Self
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more