reference_resolution_error
Stable error · Graphs
Tier: stable · Kind: error · Topic: Graphs
| Julia | TypeScript | Python | Rust | Go |
|---|---|---|---|---|
ReferenceResolutionError | ReferenceResolutionError | ReferenceResolutionError | ReferenceError, ReferenceResolutionError | ReferenceResolutionError |
Note: spelling differs from the §2 rule: rust=ReferenceError (expected ReferenceResolutionError); multiple spellings exported by: rust
Julia
struct ReferenceResolutionError <: EarthSciASTError
ReferenceResolutionError(code::String, message::String, cycle::Union{Nothing, Vector{String}})
ReferenceResolutionError(code, message, cycle)
ReferenceResolutionError(code::AbstractString, message::AbstractString)
ReferenceResolutionError(code, message[, cycle])
A reference could not be resolved, or the reference graph has a cycle. Carries a
stable code (one of the E_REF_* constants) so callers and the cross-binding
conformance suite can assert on the failure mode, and a human-readable
message. For a cycle, cycle holds the offending vertex-key path.
TypeScript
class ReferenceResolutionError extends EsmDiagnosticError
new ReferenceResolutionError(code: string, message: string, cycle?: string[]): ReferenceResolutionError
readonly ReferenceResolutionError.prototype.cycle: string[] | undefined
A reference could not be resolved, or the reference graph has a cycle.
Carries the stable code (one of the E_REF_* constants above) so callers
and the cross-binding conformance suite can assert on the failure mode. For a
cycle, cycle holds the offending vertex-key path.
Python
class ReferenceResolutionError(EarthSciAstError)
ReferenceResolutionError(code: str, message: str, cycle: list[str] | None = None)
A reference could not be resolved, or the reference graph has a cycle.
Carries a stable code (one of the E_REF_* constants) so callers and
the cross-binding conformance suite can assert on the failure mode, and a
human-readable message. For a cycle, cycle holds the offending path.
Rust
Exported as ReferenceError and ReferenceResolutionError. Both names refer to the same operation.
ReferenceError
pub type ReferenceError = ReferenceResolutionError;
Deprecated since 0.2.0: renamed to ReferenceResolutionError (API_SPEC.md §8 item 10)
Deprecated alias of ReferenceResolutionError
.
API_SPEC.md §8 item 10: Julia, Python and Go all raise
ReferenceResolutionError; this binding alone spelled it ReferenceError.
The canonical spelling is now ReferenceResolutionError; this alias is kept
for one minor per API_SPEC.md §10 and will be removed at the next major.
ReferenceResolutionError
pub enum ReferenceResolutionError {
UndeclaredIndexSet { name: String, index: String, node: String, model: String, path: String },
UnknownFaqNode { index_set: String, from_faq: String, model: String },
DuplicateNodeId { id: String, model: String, path: String, first: String },
UnresolvedJoinFactor { factor: String, node: String, model: String, path: String },
ReferenceCycle { path: Vec<String> },
}
A reference could not be resolved, or the reference graph has a cycle.
Variant names are deliberately cross-language-compatible so the Julia,
Python, and Rust bindings report the same failure mode under the same name
(mirrors the E_REF_* codes in the Python binding).
Go
type ReferenceResolutionError struct {
Code string
Message string
Cycle []string
}
func (e *ReferenceResolutionError) DiagnosticCode() string
func (e *ReferenceResolutionError) Error() string
ReferenceResolutionError reports that a reference could not be resolved, or that the reference graph has a cycle.
It carries a stable Code (one of the CodeRef* constants) so callers and the cross-binding conformance suite can assert on the failure mode, and a human-readable Message. For a cycle, Cycle holds the offending vertex-key path. All five bindings call it ReferenceResolutionError.
Methods
func (e *ReferenceResolutionError) DiagnosticCode() string
DiagnosticCode exposes the stable code, matching the convention of EvaluationError / ExpressionTemplateError elsewhere in this package.
func (e *ReferenceResolutionError) Error() string