operator_compose_require_match_error
Stable error · Flatten
Tier: stable · Kind: error · Topic: Flatten
| Julia | TypeScript | Python | Rust | Go |
|---|---|---|---|---|
OperatorComposeRequireMatchError | OperatorComposeRequireMatchError | OperatorComposeRequireMatchError | not exported | OperatorComposeRequireMatchError |
Julia
struct OperatorComposeRequireMatchError <: EarthSciASTError
OperatorComposeRequireMatchError(details::String)
OperatorComposeRequireMatchError(details)
OperatorComposeRequireMatchError
Raised when an operator_compose entry declares require_match: true and one of
systems[2]’s equations found no equation of systems[1] to land on
(esm-libraries-spec §4.7.1 step 5).
Step 5 otherwise preserves an unmatched equation unchanged, and a PARTIAL
shortfall is only a warning by default; require_match is the author’s opt-in to
make it fatal. A PARTIAL match raises here — there is no “some is enough” reading
an author could rely on.
Fields:
details::String: the entry, the merge tally, and the unmatched dependent variables.
TypeScript
class OperatorComposeRequireMatchError extends FlattenError
new OperatorComposeRequireMatchError(message: string): OperatorComposeRequireMatchError
An operator_compose entry declared require_match: true and one of
systems[1]’s equations found no equation of systems[0] to land on
(esm-libraries-spec §4.7.1 step 5).
Step 5 otherwise preserves an unmatched equation unchanged, and a PARTIAL
shortfall is only a warning by default; require_match is the author’s opt-in
to make it fatal. A PARTIAL match throws here — there is no “some is enough”
reading an author could rely on.
Python
class OperatorComposeRequireMatchError(FlattenError)
An operator_compose entry declared require_match and did not match.
esm-libraries-spec §4.7.1 step 5: require_match: true says the
systems[1] equations are CONTRIBUTIONS and every one of them must land on
an equation of systems[0]. Step 5 otherwise preserves an unmatched
equation unchanged, and a PARTIAL shortfall is only a warning by default;
this is the author’s opt-in to make it fatal.
A PARTIAL match raises here. There is no “some is enough” reading an author could rely on: the seven-of-twelve-species case is exactly the defect the flag exists to catch.
Rust
Rust does not export this error.
Go
type OperatorComposeRequireMatchError struct {
// A and B are the entry's two systems, Systems[0] and Systems[1].
A, B string
// Unmatched names the dependent variables that found no counterpart, in
// document order.
Unmatched []string
Message string
}
func (e *OperatorComposeRequireMatchError) DiagnosticCode() string
func (e *OperatorComposeRequireMatchError) Error() string
OperatorComposeRequireMatchError reports that an operator_compose entry declared require_match: true and one of Systems
’s equations found no equation of Systems
\[0\]to land on (esm-libraries-spec §4.7.1 step 5).
Step 5 otherwise preserves an unmatched equation unchanged, and a PARTIAL shortfall is only a warning by default; require_match is the author’s opt-in to make it fatal. A PARTIAL match fails here — there is no “some is enough” reading an author could rely on.
Methods
func (e *OperatorComposeRequireMatchError) DiagnosticCode() string
DiagnosticCode returns the stable diagnostic code (DiagnosticError).
func (e *OperatorComposeRequireMatchError) Error() string