pub enum RunError {
NotFound(String),
NotAllowed(String),
Injects {
task: String,
args: Vec<String>,
},
MissingArg(MissingArg),
Dependency(DepError),
Cancelled,
Io {
task: String,
program: String,
cwd: PathBuf,
source: Error,
},
}Expand description
Why a run* call could not complete. It reports the failure to resolve or
dispatch a job; a job that runs to a non-zero exit is not an error here (the
exit status rides back in the Ok). Only Debug is derived, because Io
wraps a std::io::Error, which is neither Clone nor PartialEq.
Variants§
NotFound(String)
No job by that name across the resolved files (from run/run_captured).
NotAllowed(String)
The nearest definition of the named job is not Agent: allow, so an agent
surface may not run it (from run_agent only). A nearer non-allowed
definition shadowing a farther allowed one lands here too: fail closed.
Injects
The agent target raw-templates a declared arg into its script via
{{ arg }} (from run_agent only). args lists the offending names.
The job must read the value from the environment instead before an agent
may run it.
MissingArg(MissingArg)
A required positional argument had no value.
Dependency(DepError)
The Requires: chain could not be resolved (a typo or a cycle).
Cancelled
The run was stopped through a Cancel handle.
Distinct from a failing step: nothing went wrong, someone asked for it to stop. A caller that treats every non-success as an error would otherwise report a cancellation as a task failure.
Io
Spawning a step failed: the interpreter is not installed, or the directory the task would run in is gone.
Carries which task and which program, because the bare io::Error was
“No such file or directory (os error 2)” and nothing else. In a
Requires: chain that named neither the failing step nor the thing that
was missing, and the obvious reading of it, that a file the script
wanted was absent, was the wrong one.
Trait Implementations§
Source§impl Error for RunError
impl Error for RunError
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()