pub enum ProcError {
Show 14 variants
ProcessNotFound(String),
NameNotFound {
name: String,
in_command_line: usize,
},
FilteredOut {
target: String,
reason: String,
},
PortNotFound(u16),
PermissionDenied(u32),
InvalidInput(String),
ConfirmationRequired {
message: String,
processes: Vec<Process>,
not_found: Option<Vec<String>>,
},
SystemError(String),
Timeout(String),
ParseError(String),
NotSupported(String),
ProcessGone(u32),
SignalError(String),
Reported {
message: String,
exit_code: ExitCode,
},
}Expand description
Main error type for proc operations
Variants§
ProcessNotFound(String)
No process found matching the given target
NameNotFound
No process has this name, but some have it in their command line, which
--cmd would match
Fields
FilteredOut
A target exists but --in or --by ruled out everything it matched.
The target sits in the quotes and the reason follows them.
Fields
PortNotFound(u16)
No process is listening on the specified port
PermissionDenied(u32)
Insufficient permissions to operate on the process
InvalidInput(String)
User provided invalid input or arguments
ConfirmationRequired
A command that changes processes was run without --yes where nobody
can be asked (--json, or no terminal). Carries the processes it would
have changed so --json callers can see them in the error.
Fields
SystemError(String)
An underlying system call failed
Timeout(String)
The operation exceeded the allowed time limit
ParseError(String)
Failed to parse input or system output
NotSupported(String)
Feature is not available on the current platform
ProcessGone(u32)
The target process terminated during the operation
SignalError(String)
Failed to send a signal to the process
Reported
The command already printed its result, but the operation did not fully
succeed (some processes failed, a port stayed busy, a wait timed out).
main exits with exit_code without printing anything further.
Implementations§
Trait Implementations§
Source§impl Error for ProcError
impl Error for ProcError
1.30.0 · 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
use the Display impl or to_string()