Skip to content

Commit 4904a69

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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exist-core/src/main/java/org/exist/xquery/PathExpr.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,15 +499,15 @@ public String getLiteralValue() {
499499

500500
@Override
501501
public int getLine() {
502-
if (line < 0 && steps.size() > 0) {
502+
if (line <= 0 && steps.size() > 0) {
503503
return steps.get(0).getLine();
504504
}
505505
return line;
506506
}
507507

508508
@Override
509509
public int getColumn() {
510-
if (column < 0 && steps.size() > 0) {
510+
if (column <= 0 && steps.size() > 0) {
511511
return steps.get(0).getColumn();
512512
}
513513
return column;

0 commit comments

Comments
 (0)