SpiceCompiler reports expected netlist failures as structured diagnostics.
Codes are stable and suitable for tests, suppressions, CI policies, editor
integration, and issue reports. Source positions are one-based and span ends
are exclusive.
Diagnostic code families:
SSP1xxx— lexer and parser syntaxSSP2xxx— preprocessing and source accessSSP3xxx— unsupported constructsSSP4xxx— semantic translationSSP5xxx— structural lintingSSP6xxx— compatibility behavior
SpiceDiagnosticPolicy may suppress non-error diagnostics or change their
effective severity. Raw errors cannot be suppressed or downgraded. The raw
AllDiagnostics collection always determines Success, Model, and
Compatibility; the effective Diagnostics collection determines
PolicySuccess.
Lexical error. The source contains text that cannot be tokenized, such as an invalid character or malformed token. Correct the source at the reported span.
Syntax error. Tokens do not form a valid SPICE statement, or a required
structural statement such as .END is missing. Correct the statement near the
reported span.
Preprocessing error. An include, library section, macro, or other preprocessing operation failed. Inspect the message, dependency record, and include stack.
Root source file not found. Verify the path passed to
SpiceCompiler.CompileFile.
Root source file could not be read. Verify permissions, encoding, and whether another process has locked the file.
Unsupported component. Replace it with supported primitives or register a custom component reader.
Unsupported parameter. Remove the parameter, translate it to a supported equivalent, or extend the relevant reader.
Unsupported model or model level. Use a supported model, provide an equivalent subcircuit, or add the required SpiceSharp implementation.
Unsupported control statement. Remove the control or express its behavior through supported analyses and directives.
Unsupported source waveform. Rewrite the waveform using supported source syntax or provide a custom waveform mapping.
Unsupported option. Remove the option when it only affects a vendor UI, or translate behavior-changing options to a supported equivalent.
Unsupported export. Replace the requested output with a supported .SAVE,
.PRINT, .PLOT, or measurement expression.
Unsupported syntax that does not fit a narrower SSP3xxx category. Review the
reported construct and dialect, then replace it or add a custom reader mapping.
Semantic translation error. The parsed statement could not be converted into SpiceSharp entities, analyses, or exports. Inspect the source span and message for the invalid reference or value.
Floating node. Connect the node to the intended circuit or remove the unconnected branch.
Missing DC path. Add an appropriate resistive or source path so the operating point can be established.
Missing model. Define the referenced .MODEL, include the model library, or
correct the model name.
Duplicate component name. Rename one of the components so entity names are unique under the selected case-sensitivity rules.
Missing AC magnitude. Add an AC magnitude to a source used by an AC analysis.
Transient maximum step may be too large or unspecified. Supply the fourth
.TRAN argument when the circuit needs tighter time resolution.
Empty circuit. Add at least one simulatable circuit entity.
No simulation command. Add an analysis such as .OP, .DC, .AC, .TRAN,
or .NOISE.
No exports. Add .SAVE, .PRINT, or another supported output directive when
waveform data is required.
Recognized construct ignored. The construct is accepted for compatibility but has no runtime effect. It is safe to suppress only when that omission is acceptable.
Numeric compatibility divergence. Simulation can proceed, but an algorithm or numeric sequence differs from the source simulator. Review the documented difference before relying on exact parity.
Compatibility approximation. Vendor syntax was lowered to supported behavior that may not be perfectly equivalent. Review the suggested fix and validate the affected behavior.