Skip to content
Snippets Groups Projects
Commit db2e32df authored by Sebastian Krings's avatar Sebastian Krings
Browse files

improve error message

parent 47efa893
Branches
No related tags found
No related merge requests found
...@@ -6,15 +6,24 @@ ...@@ -6,15 +6,24 @@
package de.prob.core.command; package de.prob.core.command;
import java.util.*; import java.util.Collection;
import java.util.HashSet;
import org.eventb.core.*; import java.util.Set;
import org.osgi.service.prefs.*;
import org.eventb.core.IContextRoot;
import org.eventb.core.IEventBRoot;
import org.eventb.core.IMachineRoot;
import org.osgi.service.prefs.BackingStoreException;
import org.osgi.service.prefs.Preferences;
import org.rodinp.core.RodinDBException; import org.rodinp.core.RodinDBException;
import de.prob.core.*; import de.prob.core.Animator;
import de.prob.core.LanguageDependendAnimationPart;
import de.prob.core.command.internal.InternalLoadCommand; import de.prob.core.command.internal.InternalLoadCommand;
import de.prob.core.domainobjects.*; import de.prob.core.domainobjects.MachineDescription;
import de.prob.core.domainobjects.Operation;
import de.prob.core.domainobjects.ProBPreference;
import de.prob.core.domainobjects.State;
import de.prob.core.langdep.EventBAnimatorPart; import de.prob.core.langdep.EventBAnimatorPart;
import de.prob.exceptions.ProBException; import de.prob.exceptions.ProBException;
import de.prob.logging.Logger; import de.prob.logging.Logger;
...@@ -88,7 +97,19 @@ public final class LoadEventBModelCommand { ...@@ -88,7 +97,19 @@ public final class LoadEventBModelCommand {
Operation.NULL_OPERATION); Operation.NULL_OPERATION);
if (commandResult.isTimeoutOccured() && context) { if (commandResult.isTimeoutOccured() && context) {
final String message = "A timeout occured when finding constants. Typically this means, that your axioms are too complicated for automatical solving. You might create an animation refinement using the context menu to help ProB finding a solution."; final String message;
int solsFound = explore.getState().getEnabledOperations().size();
if (solsFound > 0) {
message = "A timeout occured when finding constants after finding "
+ solsFound
+ " solution(s)."
+ " Typically this means, that your axioms are too complicated for automatical solving. "
+ "You might create an animation refinement using the context menu to help ProB finding all solutions.";
} else {
message = "A timeout occured when finding constants."
+ " Typically this means, that your axioms are too complicated for automatical solving. "
+ "You might create an animation refinement using the context menu to help ProB finding a solution.";
}
Logger.notifyUserWithoutBugreport(message); Logger.notifyUserWithoutBugreport(message);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment