diff --git a/de.prob.core/src/de/prob/core/internal/AnimatorImpl.java b/de.prob.core/src/de/prob/core/internal/AnimatorImpl.java index d029a97b7877124e1c1a2a599f3189cba860d025..78d90351df0c8586eb3c8b8a7b760e83fe1bb18d 100644 --- a/de.prob.core/src/de/prob/core/internal/AnimatorImpl.java +++ b/de.prob.core/src/de/prob/core/internal/AnimatorImpl.java @@ -162,11 +162,11 @@ public class AnimatorImpl { assert !(topnode instanceof ACallBackResult); if (!(topnode instanceof AYesResult)) { - if (query.length() > 400) { - throw new ResultParserException("Prolog query failed - received " + topnode.getClass().getSimpleName() + " in response to query: " + query.substring(0, 400), null); - } else { - throw new ResultParserException("Prolog query failed - received " + topnode.getClass().getSimpleName() + " in response to query: " + query, null); + String queryForMessage = query; + if (queryForMessage.length() > 400) { + queryForMessage = queryForMessage.substring(0, 400) + "..."; } + throw new ResultParserException("Prolog query failed - received " + topnode.getClass().getSimpleName() + " in response to query: " + queryForMessage, null); } bindings = BindingGenerator.createBinding(PrologTermGenerator.toPrologTerm(topnode)); } catch (ResultParserException e) {