Package org.tomlj
Class TomlBindError
java.lang.Object
org.tomlj.TomlBindError
- All Implemented Interfaces:
Serializable
A value of a TOML document that could not be bound to its Java type.
- See Also:
-
Method Summary
Modifier and TypeMethodDescription@Nullable Throwablecause()The exception that caused this error.booleaninthashCode()message()What is wrong with the value, such asexpected an integer, found a string.path()The path of the value within the table or array that was bound.@Nullable TomlPositionposition()The position of the value in the TOML document.toString()
-
Method Details
-
path
The path of the value within the table or array that was bound.The path is a dotted key, with
[i]after the key of an array for its element at indexi, such asservers[1].host. It is empty for the table or array that was bound.- Returns:
- The path of the value.
-
message
What is wrong with the value, such asexpected an integer, found a string.- Returns:
- A description of the error, without the path or position.
-
position
The position of the value in the TOML document.For an unknown key, this is the position of the key, and for a missing key, the position of the table the key is missing from: its header, or the start of the document for the root table of a document.
- Returns:
- The position, or
nullif the value, or the table for a missing key, was not read from a document.
-
cause
The exception that caused this error.An exception thrown by a record's constructor or by a converter is reported as an error with its message, and kept here. The cause is not part of the error's equality or its string form.
- Returns:
- The exception thrown, or
nullif the error was found by binding itself.
-
equals
-
hashCode
public int hashCode() -
toString
-