lib/error: add UndefinedAlias variant for lib/node

This commit is contained in:
Paul Stemmet 2022-04-16 13:24:43 +00:00
parent ebe7890235
commit edea9a6c4a
Signed by: Paul Stemmet
GPG Key ID: EDEA539F594E7E75
1 changed files with 9 additions and 1 deletions

View File

@ -465,6 +465,12 @@ pub(crate) mod internal
/// # ^ MissingFlowMappingEntryOrEnd
/// ```
MissingFlowMappingEntryOrEnd,
/*
* ==== Node Errors ====
*/
/// A YAML alias was used but not defined
UndefinedAlias,
}
/// Heavy and/or external errors that can occur during
@ -643,7 +649,8 @@ pub(crate) mod internal
| MissingNode
| MissingKey
| MissingFlowSequenceEntryOrEnd
| MissingFlowMappingEntryOrEnd => Category::Syntax,
| MissingFlowMappingEntryOrEnd
| UndefinedAlias => Category::Syntax,
IntOverflow | CorruptStream => Category::Data,
@ -713,6 +720,7 @@ pub(crate) mod internal
{
f.write_str("missing flow mapping delimiter ',' or '}'")
},
UndefinedAlias => f.write_str("undefined node alias found"),
}
}
}