#[non_exhaustive]pub enum CompileError {
EnvInterpolate(InterpolateError),
Parse(ParseError),
Normalize(NormalizeError),
Expand(ExpandError),
CompileAfter(CompileAfterError),
Prepare(PrepareError),
GatedClauseRequiresCompiledPath {
id: String,
clause: &'static str,
},
}Expand description
Errors produced by compile_scenario_file.
Each variant wraps the corresponding phase’s error so callers can
programmatically discriminate where compilation failed without string
matching. The #[from] conversions let each phase’s fallible call site
bubble up naturally via ?.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EnvInterpolate(InterpolateError)
Phase 0 (env_interpolate): ${VAR} substitution against the
process environment failed (unset required variable, malformed
reference, or invalid variable name).
Parse(ParseError)
Phase 1 (parse): YAML parsing or schema validation failed.
Normalize(NormalizeError)
Phase 2 (normalize): defaults resolution failed (e.g. an entry was missing a required field with no default available).
Expand(ExpandError)
Phase 3 (expand): pack expansion failed (unknown pack, unknown override key, duplicate id, or resolver I/O error).
CompileAfter(CompileAfterError)
Phase 4+5 (compile_after): after: resolution, dependency
graph, or clock-group assignment failed.
Prepare(PrepareError)
Phase 6 (prepare): translation to the runtime input shape
failed. Shape invariants not visible to earlier phases surface
here — e.g. an unknown signal_type on a programmatically-
constructed CompiledFile.
Note: the PrepareError::UnknownSignalType,
PrepareError::MissingGenerator,
PrepareError::MissingLogGenerator, and
PrepareError::MissingDistribution cases are effectively
unreachable when the input comes through
compile_scenario_file — earlier phases gate those shapes at
YAML-level. They remain reachable for programmatic callers that
build a CompiledFile
in code and feed it directly to
prepare.
GatedClauseRequiresCompiledPath
The YAML uses while: or delay: clauses, which require the
gated runtime. compile_scenario_file returns
Vec<ScenarioEntry>, a shape that has no fields for these
clauses, so silently accepting such input would drop the gate
semantics and run the downstream as ungated. Call
compile_scenario_file_compiled instead and feed the
resulting CompiledFile to
run_multi_compiled.
Trait Implementations§
Source§impl Debug for CompileError
impl Debug for CompileError
Source§impl Display for CompileError
impl Display for CompileError
Source§impl Error for CompileError
impl Error for CompileError
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()