Package eu.woolplatform.utils.json
Class JsonParseException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- eu.woolplatform.utils.json.JsonParseException
-
- All Implemented Interfaces:
Serializable
public class JsonParseException extends Exception
This exception is thrown when a JSON string can't be parsed.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JsonParseException(String message, int line, int linePos)Constructs a new exception.JsonParseException(String message, JsonParseException cause)Constructs a new message with another JsonParseException as the cause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetLine()Returns the line number.intgetLinePos()Returns the character number in the line.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
JsonParseException
public JsonParseException(String message, int line, int linePos)
Constructs a new exception. The line number and character number will be appended to the message.- Parameters:
message- the error messageline- the line number (first line is 1)linePos- the character number in the line (first character is 1)
-
JsonParseException
public JsonParseException(String message, JsonParseException cause)
Constructs a new message with another JsonParseException as the cause. The cause cannot be null. This constructor does not append the line number and character number to the message.- Parameters:
message- the messagecause- the cause (not null)
-
-