X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=iotjava%2Fiotpolicy%2FIoTCompiler.java;h=04bf089ff98dd06529ff480ecd66dd5ca1734b53;hb=38523cbbcc710ff7413e8b5d85df402aa109bd13;hp=d056fe473e4c13377445fb38b21389c1e65fc5dd;hpb=3c4fd177d5f1eec65478dee1d16f7eb0ad31bcf6;p=iot2.git diff --git a/iotjava/iotpolicy/IoTCompiler.java b/iotjava/iotpolicy/IoTCompiler.java index d056fe4..04bf089 100644 --- a/iotjava/iotpolicy/IoTCompiler.java +++ b/iotjava/iotpolicy/IoTCompiler.java @@ -3138,7 +3138,7 @@ public class IoTCompiler { int newObjectId = getNewIntfaceObjectId(newIntface); println("if (set" + newObjectId + "Allowed.find(methodId) == set" + newObjectId + "Allowed.end()) {"); println("cerr << \"Callback object for " + intface + " is not allowed to access method: \" << methodId;"); - println("exit(-1);"); + println("return;"); println("}"); } } @@ -3164,7 +3164,7 @@ public class IoTCompiler { println(" else {"); println("cerr << \"Illegal object Id: \" << to_string(objId);"); // TODO: perhaps need to change this into "throw" to make it cleaner (allow stack unfolding) - println("exit(-1);"); + println("return;"); println("}"); println("}"); println("}\n"); @@ -4149,12 +4149,12 @@ public class IoTCompiler { println("if (_objectId == object" + newObjectId + "Id) {"); println("if (set" + newObjectId + "Allowed.find(methodId) == set" + newObjectId + "Allowed.end()) {"); println("cerr << \"Object with object Id: \" << _objectId << \" is not allowed to access method: \" << methodId << endl;"); - println("exit(-1);"); + println("return;"); println("}"); println("}"); println("else {"); println("cerr << \"Object Id: \" << _objectId << \" not recognized!\" << endl;"); - println("exit(-1);"); + println("return;"); println("}"); } }