pub enum TraceError {
ProgramNotFound {
program: AbsolutePath,
accesses: Accesses,
tree: Option<ProcessTree>,
},
ProgramNotExecutable {
program: AbsolutePath,
source: Error,
accesses: Accesses,
tree: Option<ProcessTree>,
},
StartFailed {
program: AbsolutePath,
source: Error,
accesses: Accesses,
tree: Option<ProcessTree>,
},
Tracer {
message: String,
source: Option<Error>,
},
}Expand description
A request that did not produce a RunResult.
The variants keep three cases apart, because the engine treats them differently: a missing or non-executable program fails its task and is recorded like any other failure; another failure to start is not cached; and a failure of the tracer itself is neither the command’s fault nor cached.
Variants§
ProgramNotFound
The program does not exist.
Fields
program: AbsolutePathThe program of the request.
tree: Option<ProcessTree>The tree of the one process that tried to start the program, when the
request asked for it with RunRequest::tree.
ProgramNotExecutable
The program exists but cannot be executed.
Fields
program: AbsolutePathThe program of the request.
tree: Option<ProcessTree>The tree of the one process that tried to start the program, when the
request asked for it with RunRequest::tree.
StartFailed
The command could not start for a reason other than a missing or non-executable program.
Fields
program: AbsolutePathThe program of the request.
tree: Option<ProcessTree>The tree of the one process that tried to start the program, when the
request asked for it with RunRequest::tree.
Tracer
The tracer itself failed, independently of the command.
Implementations§
Source§impl TraceError
impl TraceError
Sourcepub const fn is_missing_program(&self) -> bool
pub const fn is_missing_program(&self) -> bool
Whether the program is missing or not executable, the one failure to start that is recorded like any other task failure.
Sourcepub const fn is_tracer_failure(&self) -> bool
pub const fn is_tracer_failure(&self) -> bool
Whether the tracer itself failed, rather than the command.
Sourcepub const fn accesses(&self) -> Option<&Accesses>
pub const fn accesses(&self) -> Option<&Accesses>
The paths touched while trying to start the program, if the error is a failure to start.
Sourcepub const fn tree(&self) -> Option<&ProcessTree>
pub const fn tree(&self) -> Option<&ProcessTree>
The tree of the one process that tried to start the program, if the error is a failure to start and the request asked for the tree.
Trait Implementations§
Source§impl Debug for TraceError
impl Debug for TraceError
Source§impl Display for TraceError
impl Display for TraceError
Source§impl Error for TraceError
impl Error for TraceError
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()