Class JException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.dashjoin.jsonata.JException
-
Constructor Summary
ConstructorsConstructorDescriptionJException(String error) JException(String error, int location) JException(String error, int location, Object currentToken) JException(String error, int location, Object currentToken, Object expected) JException(Throwable cause, String error, int location, Object currentToken, Object expected) -
Method Summary
Modifier and TypeMethodDescriptionReturns the current tokenReturns the error message with error details in the text.getError()Returns the error code, i.e.Returns the expected tokenintReturns the error location (in characters)static StringGenerate error message from given error code Codes are defined in Jsonata.errorCodes Fallback: if error code does not exist, return a generic messagestatic StringGenerate error message from given error code Codes are defined in Jsonata.errorCodes Fallback: if error code does not exist, return a generic messageMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
JException
-
JException
-
JException
-
JException
-
JException
-
-
Method Details
-
getError
-
getLocation
public int getLocation()Returns the error location (in characters)- Returns:
-
getCurrent
-
getExpected
-
getDetailedErrorMessage
Returns the error message with error details in the text. Example: Syntax error: ")" {code=S0201 position=3}- Returns:
-
msg
-
msg
Generate error message from given error code Codes are defined in Jsonata.errorCodes Fallback: if error code does not exist, return a generic message- Parameters:
error-location-arg1-arg2-details- True = add error details as text, false = don't add details (use getters to retrieve details)- Returns:
-