pub enum BuildError {
Parse {
message: String,
line_start: usize,
line_end: usize,
},
UnsupportedElement(String),
InvalidElement {
name: String,
message: String,
},
InvalidElementField {
line: usize,
name: String,
message: String,
},
DuplicateElement(String),
UnknownControllingBranch(String),
UnknownInductor(String),
InvalidInitialConditionDirective {
line: usize,
target: String,
message: String,
},
}Expand description
Error returned while parsing or stamping a netlist.
Variants§
Parse
general-spice-core rejected a statement.
Fields
UnsupportedElement(String)
A device does not have a linear stamp.
InvalidElement
An element was syntactically parsed but cannot be stamped.
InvalidElementField
A device card carries a trailing parameter this crate does not recognize. Reported
rather than silently discarded — see [validate_trailing_fields].
Fields
DuplicateElement(String)
Two branch devices have the same case-insensitive name.
UnknownControllingBranch(String)
A current-controlled source refers to a device without a branch current.
UnknownInductor(String)
A mutual-inductance element refers to an unknown inductor.
InvalidInitialConditionDirective
A .IC line assigns something this crate cannot start from: a target that is not
V(<node>), V(<node>,<node>) or I(<inductor>), a node or element the netlist does
not have, ground, or a value that does not parse. Reported rather than dropped, for the
same reason as InvalidElementField — see
[dot_ic_condition].
Trait Implementations§
Source§impl Clone for BuildError
impl Clone for BuildError
Source§impl Debug for BuildError
impl Debug for BuildError
Source§impl Display for BuildError
impl Display for BuildError
Source§impl Error for BuildError
impl Error for BuildError
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()