We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 26b893a commit 2265a9aCopy full SHA for 2265a9a
1 file changed
src/sqlancer/common/query/SQLQueryAdapter.java
@@ -98,17 +98,15 @@ public String getUnterminatedQueryString() {
98
public void checkException(Exception e) throws AssertionError {
99
Throwable ex = e;
100
101
- while (true) {
+ while (ex != null) {
102
if (expectedErrors.errorIsExpected(ex.getMessage())) {
103
return;
104
- } else if (ex.getCause() != null) {
105
- ex = ex.getCause();
106
} else {
107
- break;
+ ex = ex.getCause();
108
}
109
110
111
- throw new AssertionError(query, ex);
+ throw new AssertionError(query, e);
112
113
114
@Override
0 commit comments