Skip to content

Commit 2265a9a

Browse files
committed
Reworked checkExceptions method
1 parent 26b893a commit 2265a9a

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/sqlancer/common/query/SQLQueryAdapter.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,15 @@ public String getUnterminatedQueryString() {
9898
public void checkException(Exception e) throws AssertionError {
9999
Throwable ex = e;
100100

101-
while (true) {
101+
while (ex != null) {
102102
if (expectedErrors.errorIsExpected(ex.getMessage())) {
103103
return;
104-
} else if (ex.getCause() != null) {
105-
ex = ex.getCause();
106104
} else {
107-
break;
105+
ex = ex.getCause();
108106
}
109107
}
110108

111-
throw new AssertionError(query, ex);
109+
throw new AssertionError(query, e);
112110
}
113111

114112
@Override

0 commit comments

Comments
 (0)