Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.
In a scripting datasource, javaScript one line occur error,the next code will not execute
-
if one line javascript occur error,the next code will not execute,this often happened in condition like this,one variable point is disabled or some error else.
p1.set(pa.value-pa.ago(HOUR));
P2.set(pb.value-pb.ago(HOUR));
.........if p1 point is disabled or some error else, will occur error,and the next javascipt can not execte, how to resume execute next code when one line script occur error.
-
I would think you could first do a check to make sure the point has a value before you execute the command. This might be a question for one of our developers and I will see what they think.
-
a typical error is one datapoint which in context var list be disabled, or be delete in other place,this datapoint var will occur ReferenceError: "p1" is not defined, and the next script will not execute.
I have tryed to use typeof p1 !=undefined or p1!=null to check first , but it seem like don't work.