pub enum ToolError {
NotFound {
tool: &'static str,
install_hint: &'static str,
},
ExitNonZero {
tool: &'static str,
code: Option<i32>,
stderr: String,
},
TimedOut {
tool: &'static str,
timeout: Duration,
},
NoOutput {
tool: &'static str,
},
Io(Error),
}Expand description
Why an external tool invocation ([execute]) failed.
tool names the CLI tool ("lightningcss", "esbuild") in every variant so a
caller juggling both CSS and JS pipelines can report which one broke without
threading the name through separately.
Variants§
NotFound
program was not found on PATH. install_hint is preset-specific guidance
(e.g. an npm install command) surfaced verbatim in the error message.
ExitNonZero
The process ran and exited with a non-zero status. stderr carries whatever
diagnostic the tool itself printed.
TimedOut
The process did not finish within the given timeout. The process is killed
(kill_on_drop) rather than left to run in the background.
NoOutput
The process exited successfully but output_path is missing or empty — the
tool silently produced nothing.
Io(Error)
A spawn/wait failure not attributable to a missing binary.
Trait Implementations§
Source§impl Error for ToolError
impl Error for ToolError
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()