Skip to content

Commit

Permalink
SourceScriptBuilder IllegalArgumentException is unreasonable (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
sim-wangyan committed Mar 30, 2022
1 parent d521f58 commit 4c92cfa
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package io.xream.sqli.builder;


import io.xream.sqli.exception.CriteriaSyntaxException;
import io.xream.sqli.exception.NotSupportedException;
import io.xream.sqli.exception.ParsingException;
import io.xream.sqli.parser.Parser;
Expand Down Expand Up @@ -87,7 +88,7 @@ static List<SourceScript> parse(List<String> sourceScriptsSplittedList) {
String str = sourceScriptsSplittedList.get(i);
String strUpper = str.toUpperCase();
if (strUpper.equals("AND") || strUpper.equals("OR"))
throw new IllegalArgumentException("SourceScript String does not support ON AND | OR, try to call builder.sourceScript()");
throw new CriteriaSyntaxException("SourceScript String does not support ON AND | OR, try to invoke builder.sourceBuilder()");

if ("FROM".equals(strUpper))
continue;
Expand Down

0 comments on commit 4c92cfa

Please sign in to comment.