pdata JSON/YAML/TOML for Dart

Exceptions

Part of the API Reference.

PdataFileNotFoundException

Thrown by pdataReadFile and pdataReadFileAsync when the requested file does not exist.

PropertyTypeDescription
pathStringThe path that was looked up and could not be found.

PdataFormatException

Thrown when a PdataFormat can’t be determined from a file extension and none was explicitly supplied, or when a value can’t be represented in the requested format (for example, null has no TOML equivalent).

PropertyTypeDescription
messageStringA human-readable description of what went wrong.

PdataParseException

Thrown by the YAML and TOML parsers when the input text is malformed. JSON parse failures surface as Dart’s own FormatException (thrown by dart:convert), so this type is only used by pdata’s own YAML and TOML parsers.

PropertyTypeDescription
messageStringA human-readable description of what went wrong.
lineint?The 1-based line number the error occurred on, if known.