Skip to content
Snippets Groups Projects
Commit 0a854b6d authored by Michael Leuschel's avatar Michael Leuschel
Browse files

catch null operation in getCustomOperation

and provide dialog
parent fe13d75c
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,7 @@ import de.prob.core.command.*;
import de.prob.core.domainobjects.Operation;
import de.prob.core.domainobjects.OperationInfo;
import de.prob.exceptions.ProBException;
import de.prob.logging.Logger;
import de.prob.unicode.UnicodeTranslator;
public class CustomPreconditionInputDialog extends InputDialog {
......@@ -72,8 +73,11 @@ public class CustomPreconditionInputDialog extends InputDialog {
animator, op.getSource(),
Operation.getInternalName(op.getName()),
UnicodeTranslator.toUnicode(getValue()));
if (customOp==null) {
Logger.notifyUser("Could not execute the event "+ op.getName() + " with the additional predicate provided!");
} else {
ExecuteOperationCommand.executeOperation(animator, customOp);
}
} catch (ProBException e) {
// TODO Auto-generated catch block
e.printStackTrace();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment