Skip to content
Snippets Groups Projects
Commit 6c2ab074 authored by dgelessus's avatar dgelessus
Browse files

Remove no longer needed handling of null ProBError.getErrors

If there is no detailed error information, it now always returns an
empty list and never null.
parent c7674844
No related branches found
No related tags found
No related merge requests found
Pipeline #94445 passed
......@@ -902,12 +902,6 @@ public final class ProBKernel extends BaseKernel {
this.errorStyler.primary("Error from ProB: ")
+ this.errorStyler.secondary(String.valueOf(proBError.getOriginalMessage()))
).split("\n")));
if (proBError.getErrors() == null) {
// If the errors list is null rather than empty, don't show the "no error messages" message.
// (This matches the normal behavior of ProBError.)
} else if (proBError.getErrors().isEmpty()) {
out.addAll(this.errorStyler.primaryLines("ProB returned no error messages.\n"));
} else {
if (proBError.getErrors().size() > 1) {
out.addAll(this.errorStyler.primaryLines(proBError.getErrors().size() + " errors:\n"));
}
......@@ -917,7 +911,6 @@ public final class ProBKernel extends BaseKernel {
out.addAll(formatErrorSource(contextSourceLines, location));
}
}
}
return out;
} else {
return this.errorStyler.secondaryLines(e.toString());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment