Skip to content

Commit 12618ef

Browse files
authored
Parsing exception fix (#16)
Fixed: - No longer shows parsing errors as exceptions Changed: - Analyze no longer throws an exception when a parse error is detected
1 parent 6d5cf57 commit 12618ef

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

  • src/main/java/edu/uiowa/cs/clc/kind2/results

src/main/java/edu/uiowa/cs/clc/kind2/results/Result.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -126,31 +126,11 @@ private void analyze() {
126126
if (root == null) {
127127
// if the root object is null at this point, then we couldn't parse the json output properly.
128128
// It makes sense to throw kind2 errors found in the log objects.
129-
throwKind2Errors();
130129
return;
131130
}
132131
root.analyze();
133132
}
134133

135-
/**
136-
* throw a {@link RuntimeException} if at least one of kind2 logs is error, fatal, or off.
137-
*/
138-
private void throwKind2Errors() {
139-
StringBuilder stringBuilder = new StringBuilder();
140-
stringBuilder
141-
.append("An error has occurred during kind2 analysis. Please check the following logs:\n");
142-
boolean someError = false;
143-
for (Log log : kind2Logs) {
144-
if (log.getLevel() == LogLevel.error || log.getLevel() == LogLevel.fatal
145-
|| log.getLevel() == LogLevel.off) {
146-
stringBuilder.append(log + "\n");
147-
someError = true;
148-
}
149-
}
150-
if (someError) {
151-
throw new RuntimeException(stringBuilder.toString());
152-
}
153-
}
154134

155135
@Override
156136
public String toString() {

0 commit comments

Comments
 (0)