Skip to content

Commit 7fbfe3d

Browse files
authored
Merge pull request sqlancer#1133 from codebreaker32/feat/add-exception-msg
Added IllegalArgumentException to handle the possible exception.
2 parents 6b5a55d + 44a6f98 commit 7fbfe3d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/sqlancer/common/query/ExpectedErrors.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,17 @@ public ExpectedErrors addRegex(Pattern errorPattern) {
4343
}
4444

4545
public ExpectedErrors addRegexString(String errorPattern) {
46+
if (errorPattern == null) {
47+
throw new IllegalArgumentException();
48+
}
4649
regexes.add(Pattern.compile(errorPattern));
4750
return this;
4851
}
4952

5053
public ExpectedErrors addAll(Collection<String> list) {
54+
if (list == null) {
55+
throw new IllegalArgumentException();
56+
}
5157
errors.addAll(list);
5258
return this;
5359
}

0 commit comments

Comments
 (0)