pub enum ErrorKind {
Show 59 variants
TildeWithoutValidHome,
AssigningListToArrayMember,
ConvertingAssociativeArrayToIndexedArray,
ConvertingIndexedArrayToAssociativeArray,
FailedSourcingFile(PathBuf, Error),
FailedToSendSignal,
CannotAssignToSpecialParameter,
CheckedExpansionError(String),
FunctionNotFound(String),
CommandNotFound(String),
BuiltinNotFound(String),
WorkingDirMissing(PathBuf),
FailedToExecuteCommand(String, Error),
HistoryItemNotFound,
Unimplemented(&'static str),
UnimplementedAndTracked(&'static str, u32),
MissingScope,
NotADirectory(PathBuf),
IsADirectory,
NotArray,
NoCurrentUser,
InvalidRedirection,
RedirectionFailure(String, String),
EvalError(EvalError),
IntParseError(ParseIntError),
TryIntParseError(TryFromIntError),
FromUtf8Error(FromUtf8Error),
Utf8Error(Utf8Error),
ReadonlyVariable,
InvalidPattern(String),
RegexError(Error),
InvalidRegexError(Error, String),
IoError(Error),
BadSubstitution(String),
ChildCreationFailure,
FormattingError(Error),
ParseError(ParseError, SourceInfo),
FunctionParseError(String, ParseError),
WordParseError(WordParseError),
TestCommandParseError(TestCommandParseError),
BindingParseError(BindingParseError),
ThreadingError(JoinError),
InvalidSignal(String),
PlatformError(PlatformError),
InvalidUmask,
OpenFileNotReadable(&'static str),
OpenFileNotWritable(&'static str),
BadFileDescriptor(ShellFd),
PrintfFailure(i32),
PrintfInvalidUsage(String),
Interrupted,
MaxFunctionCallDepthExceeded,
TimeError(SystemTimeError),
ArrayIndexOutOfRange(i64),
UnhandledKeyCode(Vec<u8>),
BuiltinError(Box<dyn BuiltinError>, String),
NotSupportedOnThisPlatform(&'static str),
HistoryNotEnabled,
UnknownKeyBindingFunction(String),
}Expand description
Monolithic error type for the shell
Variants§
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, 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.
BuiltinNotFound(String)
Not a builtin.
WorkingDirMissing(PathBuf)
The working directory does not exist.
FailedToExecuteCommand(String, Error)
Failed to execute command.
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, String)
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(String)
Invalid substitution syntax.
ChildCreationFailure
An error occurred while creating a child process.
FormattingError(Error)
An error occurred while formatting a string.
ParseError(ParseError, SourceInfo)
An error occurred while parsing.
FunctionParseError(String, ParseError)
An error occurred while parsing a function body.
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.
PlatformError(PlatformError)
A platform error occurred.
InvalidUmask
An invalid umask was provided.
OpenFileNotReadable(&'static str)
The given open file cannot be read from.
OpenFileNotWritable(&'static str)
The given open file cannot be written to.
BadFileDescriptor(ShellFd)
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(i64)
Array index out of range.
UnhandledKeyCode(Vec<u8>)
Unhandled key code.
BuiltinError(Box<dyn BuiltinError>, String)
An error occurred in a built-in command.
NotSupportedOnThisPlatform(&'static str)
Operation not supported on this platform.
HistoryNotEnabled
Command history is not enabled in this shell.
UnknownKeyBindingFunction(String)
Unknown key binding function.
Trait Implementations§
Source§impl Error for ErrorKind
impl Error for ErrorKind
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<&ErrorKind> for ExecutionExitCode
impl From<&ErrorKind> for ExecutionExitCode
Source§impl From<BindingParseError> for ErrorKind
impl From<BindingParseError> for ErrorKind
Source§fn from(source: BindingParseError) -> Self
fn from(source: BindingParseError) -> Self
Source§impl From<FromUtf8Error> for ErrorKind
impl From<FromUtf8Error> for ErrorKind
Source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Source§impl From<ParseIntError> for ErrorKind
impl From<ParseIntError> for ErrorKind
Source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Source§impl From<PlatformError> for ErrorKind
impl From<PlatformError> for ErrorKind
Source§fn from(source: PlatformError) -> Self
fn from(source: PlatformError) -> Self
Source§impl From<SystemTimeError> for ErrorKind
impl From<SystemTimeError> for ErrorKind
Source§fn from(source: SystemTimeError) -> Self
fn from(source: SystemTimeError) -> Self
Source§impl From<TestCommandParseError> for ErrorKind
impl From<TestCommandParseError> for ErrorKind
Source§fn from(source: TestCommandParseError) -> Self
fn from(source: TestCommandParseError) -> Self
Source§impl From<TryFromIntError> for ErrorKind
impl From<TryFromIntError> for ErrorKind
Source§fn from(source: TryFromIntError) -> Self
fn from(source: TryFromIntError) -> Self
Source§impl From<WordParseError> for ErrorKind
impl From<WordParseError> for ErrorKind
Source§fn from(source: WordParseError) -> Self
fn from(source: WordParseError) -> Self
Auto Trait Implementations§
impl Freeze for ErrorKind
impl !RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl !UnwindSafe for ErrorKind
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> ConvertibleToExitCode for T
impl<T> ConvertibleToExitCode for T
Source§fn as_exit_code(&self) -> ExecutionExitCode
fn as_exit_code(&self) -> ExecutionExitCode
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