- data XmlError
- class FromXmlError a where
- fromXmlError :: XmlError -> a
- maybeRaise :: ExceptionM m i => i -> Maybe a -> m a
- asksEither :: (ReaderM m s, ExceptionM m e) => (s -> Either e a) -> m a
- asksMaybe :: (ReaderM m s, ExceptionM m e) => e -> (s -> Maybe a) -> m a
- tryMaybe :: RunExceptionM m i => m a -> m (Maybe a)
- tryBool :: RunExceptionM m i => m a -> m Bool
Error types
XML error type.
EmptyDocument | An (invalid) empty input document was observed. |
InvalidXml | Invalid XML, general parse error. |
XmlChildNotFound | An immediate child element in an XML tree was not found. |
XmlChildNotFoundQ QName | An immediate child element in an XML tree was not found, with name. |
XmlElementNotFound | An element in an XML tree was not found. |
XmlElementNotFoundQ QName | An element in an XML tree was not found, with name. |
XmlAttributeNotFound | An XML element attribute was not found. |
XmlAttributeNotFoundQ QName | An XML element attribute was not found, with name. |
UnexpectedElementNameQ QName QName | An XML element name was different than expected, with actual and expected names. |
XmlError String | A general XML error occured. |
OtherError String | A general error occured. |
class FromXmlError a whereSource
An error type that can be constructed from XmlError
.
fromXmlError :: XmlError -> aSource
Construct error value.
Error handling
maybeRaise :: ExceptionM m i => i -> Maybe a -> m aSource
asksEither :: (ReaderM m s, ExceptionM m e) => (s -> Either e a) -> m aSource
asksMaybe :: (ReaderM m s, ExceptionM m e) => e -> (s -> Maybe a) -> m aSource
tryMaybe :: RunExceptionM m i => m a -> m (Maybe a)Source