Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- data NodeType
- data ParserError
- catchParserError :: IO a -> (ParserError -> GErrorMessage -> IO a) -> IO a
- handleParserError :: (ParserError -> GErrorMessage -> IO a) -> IO a -> IO a
- data PathError
- catchPathError :: IO a -> (PathError -> GErrorMessage -> IO a) -> IO a
- handlePathError :: (PathError -> GErrorMessage -> IO a) -> IO a -> IO a
- data ReaderError
- catchReaderError :: IO a -> (ReaderError -> GErrorMessage -> IO a) -> IO a
- handleReaderError :: (ReaderError -> GErrorMessage -> IO a) -> IO a -> IO a
Enumerations
NodeType
Indicates the content of a node.
NodeTypeObject | The node contains a JSON object |
NodeTypeArray | The node contains a JSON array |
NodeTypeValue | The node contains a fundamental type |
NodeTypeNull | Special type, for nodes containing null |
AnotherNodeType Int | Catch-all for unknown values |
Instances
Enum NodeType Source # | |
Show NodeType Source # | |
Eq NodeType Source # | |
Ord NodeType Source # | |
Defined in GI.Json.Enums | |
BoxedEnum NodeType Source # | |
Defined in GI.Json.Enums | |
TypedObject NodeType Source # | |
Defined in GI.Json.Enums | |
HasParentTypes NodeType Source # | |
Defined in GI.Json.Enums | |
type ParentTypes NodeType Source # | |
Defined in GI.Json.Enums |
ParserError
data ParserError Source #
Error codes for JSON_PARSER_ERROR
.
This enumeration can be extended at later date
ParserErrorParse | parse error |
ParserErrorTrailingComma | unexpected trailing comma |
ParserErrorMissingComma | expected comma |
ParserErrorMissingColon | expected colon |
ParserErrorInvalidBareword | invalid bareword |
ParserErrorEmptyMemberName | empty member name (Since: 0.16) |
ParserErrorInvalidData | invalid data (Since: 0.18) |
ParserErrorUnknown | unknown error |
AnotherParserError Int | Catch-all for unknown values |
Instances
catchParserError :: IO a -> (ParserError -> GErrorMessage -> IO a) -> IO a Source #
Catch exceptions of type ParserError
. This is a specialized version of catchGErrorJustDomain
.
handleParserError :: (ParserError -> GErrorMessage -> IO a) -> IO a -> IO a Source #
Handle exceptions of type ParserError
. This is a specialized version of handleGErrorJustDomain
.
PathError
Error codes for JSON_PATH_ERROR
.
This enumeration can be extended at later date
Since: 0.14
PathErrorQuery | Invalid query |
AnotherPathError Int | Catch-all for unknown values |
Instances
Enum PathError Source # | |
Defined in GI.Json.Enums succ :: PathError -> PathError # pred :: PathError -> PathError # fromEnum :: PathError -> Int # enumFrom :: PathError -> [PathError] # enumFromThen :: PathError -> PathError -> [PathError] # enumFromTo :: PathError -> PathError -> [PathError] # enumFromThenTo :: PathError -> PathError -> PathError -> [PathError] # | |
Show PathError Source # | |
Eq PathError Source # | |
Ord PathError Source # | |
Defined in GI.Json.Enums | |
BoxedEnum PathError Source # | |
Defined in GI.Json.Enums | |
TypedObject PathError Source # | |
Defined in GI.Json.Enums | |
GErrorClass PathError Source # | |
Defined in GI.Json.Enums gerrorClassDomain :: PathError -> Text # | |
HasParentTypes PathError Source # | |
Defined in GI.Json.Enums | |
type ParentTypes PathError Source # | |
Defined in GI.Json.Enums |
catchPathError :: IO a -> (PathError -> GErrorMessage -> IO a) -> IO a Source #
Catch exceptions of type PathError
. This is a specialized version of catchGErrorJustDomain
.
handlePathError :: (PathError -> GErrorMessage -> IO a) -> IO a -> IO a Source #
Handle exceptions of type PathError
. This is a specialized version of handleGErrorJustDomain
.
ReaderError
data ReaderError Source #
Error codes for JSON_READER_ERROR
.
This enumeration can be extended at later date
Since: 0.12
ReaderErrorNoArray | No array found at the current position |
ReaderErrorInvalidIndex | Index out of bounds |
ReaderErrorNoObject | No object found at the current position |
ReaderErrorInvalidMember | Member not found |
ReaderErrorInvalidNode | No valid node found at the current position |
ReaderErrorNoValue | The node at the current position does not hold a value |
ReaderErrorInvalidType | The node at the current position does not hold a value of the desired type |
AnotherReaderError Int | Catch-all for unknown values |
Instances
catchReaderError :: IO a -> (ReaderError -> GErrorMessage -> IO a) -> IO a Source #
Catch exceptions of type ReaderError
. This is a specialized version of catchGErrorJustDomain
.
handleReaderError :: (ReaderError -> GErrorMessage -> IO a) -> IO a -> IO a Source #
Handle exceptions of type ReaderError
. This is a specialized version of handleGErrorJustDomain
.