Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions src/main/java/edu/uiowa/cs/clc/kind2/results/Result.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,31 +126,11 @@ private void analyze() {
if (root == null) {
// if the root object is null at this point, then we couldn't parse the json output properly.
// It makes sense to throw kind2 errors found in the log objects.
throwKind2Errors();
return;
}
root.analyze();
}

/**
* throw a {@link RuntimeException} if at least one of kind2 logs is error, fatal, or off.
*/
private void throwKind2Errors() {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder
.append("An error has occurred during kind2 analysis. Please check the following logs:\n");
boolean someError = false;
for (Log log : kind2Logs) {
if (log.getLevel() == LogLevel.error || log.getLevel() == LogLevel.fatal
|| log.getLevel() == LogLevel.off) {
stringBuilder.append(log + "\n");
someError = true;
}
}
if (someError) {
throw new RuntimeException(stringBuilder.toString());
}
}

@Override
public String toString() {
Expand Down