Skip to content

Commit

Permalink
chore: add cause to parse exception
Browse files Browse the repository at this point in the history
  • Loading branch information
tglman committed Nov 20, 2024
1 parent 5e0b9f5 commit 9833fc0
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import com.orientechnologies.common.collection.OMultiCollectionIterator;
import com.orientechnologies.common.collection.OMultiValue;
import com.orientechnologies.common.exception.OException;
import com.orientechnologies.common.log.OLogManager;
import com.orientechnologies.common.log.OLogger;
import com.orientechnologies.common.util.OCallable;
Expand Down Expand Up @@ -98,7 +99,7 @@ public static List<OStatement> parseScript(InputStream script, ODatabaseDocument
List<OStatement> result = osql.parseScript();
return result;
} catch (ParseException e) {
throw new OCommandSQLParsingException(e, "");
throw OException.wrapException(new OCommandSQLParsingException(e, ""), e);
}
}

Expand All @@ -109,7 +110,7 @@ public static OOrBlock parsePredicate(String predicate) throws OCommandSQLParsin
OOrBlock result = osql.OrBlock();
return result;
} catch (ParseException e) {
throw new OCommandSQLParsingException(e, "");
throw OException.wrapException(new OCommandSQLParsingException(e, ""), e);
}
}

Expand All @@ -120,7 +121,7 @@ public static OSecurityResourceSegment parseSecurityResource(String exp) {
OSecurityResourceSegment result = osql.SecurityResourceSegment();
return result;
} catch (ParseException e) {
throw new OCommandSQLParsingException(e, "");
throw OException.wrapException(new OCommandSQLParsingException(e, ""), e);
}
}

Expand Down

0 comments on commit 9833fc0

Please sign in to comment.