Skip to content

Commit 97fb0dd

Browse files
[feature] Add location information when throwing XPathException
1 parent 2b0738c commit 97fb0dd

File tree

452 files changed

+4800
-4617
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

452 files changed

+4800
-4617
lines changed

exist-core/src/main/antlr/org/exist/xquery/parser/DeclScanner.g

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
header {
2323
package org.exist.xquery.parser;
2424

25+
import org.exist.xquery.Expression;
2526
import org.exist.xquery.XPathException;
2627
}
2728

@@ -86,6 +87,6 @@ versionDecl throws XPathException
8687
}
8788
)?
8889
{
89-
throw new XPathException("Processing stopped");
90+
throw new XPathException((Expression) null, "Processing stopped");
9091
}
9192
;

exist-core/src/main/antlr/org/exist/xquery/parser/XQuery.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,7 @@ pragma throws XPathException
10971097
exception catch [RecognitionException e]
10981098
{
10991099
lexer.wsExplicit = false;
1100-
throw new XPathException(ErrorCodes.XPST0003, "Parse error: " + e.getMessage() + " at line: " + e.getLine() + " column: " + e.getColumn());
1100+
throw new XPathException(pragma_AST, ErrorCodes.XPST0003, "Parse error: " + e.getMessage() + " at line: " + e.getLine() + " column: " + e.getColumn());
11011101
}
11021102
;
11031103

0 commit comments

Comments
 (0)