Package net.pricefx.formulaengine
Class XExpression
- All Implemented Interfaces:
Serializable
This is the base class for all exceptions that can occurs using the Expression Class.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionXExpression(int startPosition, int endPosition, String errorMessage) Main constructor with start / end position and customized messageXExpression(int startPosition, String errorMessage) Main constructor with start position and customized messageXExpression(String errorMessage) Main constructor with customized messageXExpression(String errorMessage, Throwable cause) Main constructor with no start / end position and customized message with Throwable -
Method Summary
Modifier and TypeMethodDescriptionintGets the end position where the error occurred.Gets the source element of the errorintGets the start position where the error occurred.voidsetSourceElement(String sourceElement) Sets the source element of the errorMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
XExpression
Main constructor with customized message- Parameters:
errorMessage- customized error message
-
XExpression
Main constructor with no start / end position and customized message with Throwable- Parameters:
errorMessage- customized error messagecause- throwable passed through
-
XExpression
Main constructor with start position and customized message- Parameters:
startPosition- start position of the errorerrorMessage- customized error message
-
XExpression
Main constructor with start / end position and customized message- Parameters:
startPosition- start position of the errorendPosition- end position of the errorerrorMessage- customized error message
-
-
Method Details
-
getStartPosition
public int getStartPosition()Gets the start position where the error occurred.- Returns:
- the position of the problem.
-
getEndPosition
public int getEndPosition()Gets the end position where the error occurred.- Returns:
- the end position of the problem
-
getSourceElement
Gets the source element of the error- Returns:
- source element of the problem
-
setSourceElement
Sets the source element of the error- Parameters:
sourceElement- to be set
-