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 startLine, int startColumn, int endLine, int endColumn, String code) Builds a new metadata objectExceptionMetadata(String location, SourceRange range, String code) -
Method Summary
Modifier and TypeMethodDescriptionstatic ExceptionMetadatastatic ExceptionMetadatastatic ExceptionMetadatafromTokens(String location, org.antlr.v4.runtime.Token start, org.antlr.v4.runtime.Token end, String code) getEnd()Returns the error location in context.getStart()toString()
-
Field Details
-
EMPTY_METADATA
-
-
Constructor Details
-
ExceptionMetadata
public ExceptionMetadata(String location, int startLine, int startColumn, int endLine, int endColumn, String code) Builds a new metadata object- Parameters:
location- the URI of the JSONiq module at which the exception occurred.startLine- the starting line number at which the error occurred.startColumn- the starting column number at which the error occurred.endLine- the ending line number at which the error occurred.endColumn- the ending column number at which the error occurred.code- the query code around the error.
-
ExceptionMetadata
-
-
Method Details
-
fromToken
public static ExceptionMetadata fromToken(String location, org.antlr.v4.runtime.Token token, String code) -
fromPoint
-
fromTokens
public static ExceptionMetadata fromTokens(String location, org.antlr.v4.runtime.Token start, org.antlr.v4.runtime.Token end, String code) -
getStart
-
getEnd
-
getLineInContext
Returns the error location in context.- Returns:
- the code with a pointer to the error location.
-
toString
-