• Recent
    • Tags
    • Popular
    • Register
    • Login

    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.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    In a scripting datasource, javaScript one line occur error,the next code will not execute

    Scripting general Discussion
    2
    3
    2.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • hussamH
      hussam
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • JoelHaggarJ
        JoelHaggar
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • hussamH
          hussam
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post