Package org.rumbledb.exceptions
Class ExceptionMetadata
java.lang.Object
org.rumbledb.exceptions.ExceptionMetadata
- All Implemented Interfaces:
Serializable
Metadata for error reporting (line and column number)
- Author:
- Stefan Irimescu, Ghislain Fourny
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionExceptionMetadata
(String location, int line, int column, String code) Builds a new metadata object -
Method Summary
-
Field Details
-
EMPTY_METADATA
-
-
Constructor Details
-
ExceptionMetadata
Builds a new metadata object- Parameters:
location
- the URI of the JSONiq module at which the exception occurred.line
- the line number at which the error occurred.column
- the column number at which the error occurred.code
- the query code around the error.
-
-
Method Details
-
getTokenLineNumber
public int getTokenLineNumber()Returns the line number.- Returns:
- the line number.
-
getTokenColumnNumber
public int getTokenColumnNumber()Returns the column number.- Returns:
- the column number.
-
getLocation
Returns the location.- Returns:
- the location.
-
getCode
Returns the the query code around the error.- Returns:
- the the query code around the error.
-
getLineInContext
Returns the error location in context.- Returns:
- the code with a pointer to the error location.
-
toString
-