Class ParsingException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.spongepowered.configurate.ConfigurateException
org.spongepowered.configurate.loader.ParsingException
- All Implemented Interfaces:
- Serializable
Indicates an error that occurred while parsing the configuration.
 
These exceptions can include a specific position reference within a file.
- Since:
- 4.0.0
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intIndicates a line or column is unknown.
- 
Constructor SummaryConstructorsConstructorDescriptionParsingException(int line, int column, @Nullable String context, @Nullable String message, @Nullable Throwable cause) Create a new parsing exception.ParsingException(ConfigurationNode position, int line, int column, @Nullable String context, @Nullable String message, @Nullable Throwable cause) Create a new parsing exception.ParsingException(ConfigurationNode position, int line, int column, String context, @Nullable String message) Create a new parsing exception.
- 
Method SummaryModifier and TypeMethodDescriptionintcolumn()Column most closely associated with the error.@Nullable Stringcontext()A context line from the source, if available.@Nullable StringGet a description of the location of this error, with path included.intline()Line most closely associated with this error.static ParsingExceptionwrap(ConfigurationNode source, IOException ex) Given an unknownIOException, return it as a Configurate type.Methods inherited from class org.spongepowered.configurate.ConfigurateExceptioninitPath, path, rawMessageMethods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- 
Field Details- 
UNKNOWN_POSIndicates a line or column is unknown.- See Also:
 
 
- 
- 
Constructor Details- 
ParsingExceptionpublic ParsingException(ConfigurationNode position, int line, int column, String context, @Nullable String message) Create a new parsing exception.- Parameters:
- position- position in the node structure where the error occurred
- line- line with issue
- column- column in the line
- context- the line in a file where the error occurred
- message- message describing the error
- Since:
- 4.0.0
 
- 
ParsingExceptionpublic ParsingException(int line, int column, @Nullable String context, @Nullable String message, @Nullable Throwable cause) Create a new parsing exception.- Parameters:
- line- line with issue
- column- column in the line
- context- the line in a file where the error occurred
- message- message describing the error
- cause- direct cause
- Since:
- 4.0.0
 
- 
ParsingExceptionpublic ParsingException(ConfigurationNode position, int line, int column, @Nullable String context, @Nullable String message, @Nullable Throwable cause) Create a new parsing exception.- Parameters:
- position- position in the node structure where the error occurred
- line- line with issue
- column- column in the line
- context- the line in a file where the error occurred
- message- message describing the error
- cause- direct cause
- Since:
- 4.0.0
 
 
- 
- 
Method Details- 
wrapGiven an unknownIOException, return it as a Configurate type.If the input exis already aParsingException, this method returns the input value.- Parameters:
- source- node where the source exception was thrown
- ex- the source exception
- Returns:
- an exception, either casted or wrapped
- Since:
- 4.0.0
 
- 
lineLine most closely associated with this error.- Returns:
- line, or -1for unknown
- Since:
- 4.0.0
 
- 
columnColumn most closely associated with the error.- Returns:
- column, or -1for unknown
- Since:
- 4.0.0
 
- 
contextA context line from the source, if available.- Returns:
- context line
- Since:
- 4.0.0
 
- 
getMessageDescription copied from class:ConfigurateExceptionGet a description of the location of this error, with path included.- Overrides:
- getMessagein class- ConfigurateException
- Returns:
- message
 
 
-