Skip to content

Commit 9833fc0

Browse files
committed
chore: add cause to parse exception
1 parent 5e0b9f5 commit 9833fc0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

core/src/main/java/com/orientechnologies/orient/core/sql/OSQLEngine.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
import com.orientechnologies.common.collection.OMultiCollectionIterator;
2525
import com.orientechnologies.common.collection.OMultiValue;
26+
import com.orientechnologies.common.exception.OException;
2627
import com.orientechnologies.common.log.OLogManager;
2728
import com.orientechnologies.common.log.OLogger;
2829
import com.orientechnologies.common.util.OCallable;
@@ -98,7 +99,7 @@ public static List<OStatement> parseScript(InputStream script, ODatabaseDocument
9899
List<OStatement> result = osql.parseScript();
99100
return result;
100101
} catch (ParseException e) {
101-
throw new OCommandSQLParsingException(e, "");
102+
throw OException.wrapException(new OCommandSQLParsingException(e, ""), e);
102103
}
103104
}
104105

@@ -109,7 +110,7 @@ public static OOrBlock parsePredicate(String predicate) throws OCommandSQLParsin
109110
OOrBlock result = osql.OrBlock();
110111
return result;
111112
} catch (ParseException e) {
112-
throw new OCommandSQLParsingException(e, "");
113+
throw OException.wrapException(new OCommandSQLParsingException(e, ""), e);
113114
}
114115
}
115116

@@ -120,7 +121,7 @@ public static OSecurityResourceSegment parseSecurityResource(String exp) {
120121
OSecurityResourceSegment result = osql.SecurityResourceSegment();
121122
return result;
122123
} catch (ParseException e) {
123-
throw new OCommandSQLParsingException(e, "");
124+
throw OException.wrapException(new OCommandSQLParsingException(e, ""), e);
124125
}
125126
}
126127

0 commit comments

Comments
 (0)