TomlParserException class

An exception which is thrown when there is an error while parsing a TOML document or value.

Example:

[table

throws a TomlParserException because the closing bracket of the table definition is missing.

Inheritance
Implemented types
Annotations
  • @immutable

Constructors

TomlParserException({required String message, required String source, required int offset})
Creates a parser exception with the given message, source code and offset within the source code.
TomlParserException.from(ParserException e)
Converts a ParserException from petitparser to a TomlParserException.
factory

Properties

column int
The column within the line that corresponds to the offset within the source.
no setter
hashCode int
The hash code for this object.
no setteroverride
line int
The line that contains the offset within the source.
no setter
message String
A human readable description of the error.
final
offset int
The offset in source where the error was detected.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source String
The actual source input which caused the error.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

fromResult<T>(Result<T> result) → T
Gets the value of the given parse result if it represents a Success or throws a TomlParserException if it is a Failure.