Skip to content

Commit

Permalink
Merge 7976018 into 61999a6
Browse files Browse the repository at this point in the history
  • Loading branch information
madig authored Jan 5, 2022
2 parents 61999a6 + 7976018 commit 5c19741
Show file tree
Hide file tree
Showing 4 changed files with 449 additions and 626 deletions.
24 changes: 21 additions & 3 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,6 @@ pub enum ErrorKind {
/// Missing a close tag.
#[error("missing close tag")]
MissingCloseTag,
/// Has an unexpected tag.
#[error("unexpected tag")]
UnexpectedTag,
/// Has an invalid hexadecimal value.
#[error("bad hex value")]
BadHexValue,
Expand Down Expand Up @@ -556,6 +553,27 @@ pub enum ErrorKind {
/// Has an unexpected image field.
#[error("unexpected image field")]
UnexpectedImageField,
/// An element that can occur just once occured a second time.
#[error("there must be only one '{0}' element")]
DuplicateElement(&'static str),
/// An element that can occur just once occured a second time.
#[error("unexpected element in a format 1 glif: {0}")]
UnexpectedV1Element(&'static str),
/// An element that can occur just once occured a second time.
#[error("unexpected attribute in a format 1 glif: {0}")]
UnexpectedV1Attribute(&'static str),
/// A component had an empty `base` attribute.
#[error("a 'component' element has an empty 'base' attribute")]
ComponentEmptyBase,
/// A component was missing a `base` attribute.
#[error("a 'component' element is missing a 'base' attribute")]
ComponentMissingBase,
/// The glyph 'lib' element must contain a dictionary.
#[error("the glyph lib must be a dictionary")]
LibMustBeDictionary,
/// An angle was out of bounds.
#[error("an angle must be between 0 and 360°")]
BadAngle,
}

#[doc(hidden)]
Expand Down
Loading

0 comments on commit 5c19741

Please sign in to comment.