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

Fix a NPE in ProBKernel.formatError

parent eccbd708
No related branches found
No related tags found
No related merge requests found
...@@ -155,7 +155,10 @@ public final class ProBKernel extends BaseKernel { ...@@ -155,7 +155,10 @@ public final class ProBKernel extends BaseKernel {
this.errorStyler.primary("Error from ProB: ") this.errorStyler.primary("Error from ProB: ")
+ this.errorStyler.secondary(String.valueOf(proBError.getOriginalMessage())) + this.errorStyler.secondary(String.valueOf(proBError.getOriginalMessage()))
).split("\n"))); ).split("\n")));
if (proBError.getErrors().isEmpty()) { 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")); out.addAll(this.errorStyler.primaryLines("ProB returned no error messages.\n"));
} else if (proBError.getErrors().size() == 1) { } else if (proBError.getErrors().size() == 1) {
out.addAll(this.errorStyler.secondaryLines(proBError.getErrors().get(0).toString())); out.addAll(this.errorStyler.secondaryLines(proBError.getErrors().get(0).toString()));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment