Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
lwx228
Level VII

How do I ignore errors and let the loop continue while executing a loop in JSL?

When an error occurs in a loop during a JSL execution, how do Let the JSL to automatically ignore the error and proceed to the next loop and continue?

 

Thank you very much!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
txnelson
Super User

Re: How do I ignore errors and let the loop continue while executing a loop in JSL?

The easiest way to handle this is to use the Try() function.

 

It allows you to return a value if the statement(s) within the Try() function have an error.  You can then detect the error and handle it the way it needs to be handled.

See the Try() function in the Scripting Index for definition and example

Jim

View solution in original post

3 REPLIES 3
Highlighted
lwx228
Level VII

Re: How do I ignore errors and let the loop continue while executing a loop in JSL?

This code is available in VBA:
On Error GoTo ,


but I haven't found similar functionality in JSL.
Highlighted
txnelson
Super User

Re: How do I ignore errors and let the loop continue while executing a loop in JSL?

The easiest way to handle this is to use the Try() function.

 

It allows you to return a value if the statement(s) within the Try() function have an error.  You can then detect the error and handle it the way it needs to be handled.

See the Try() function in the Scripting Index for definition and example

Jim

View solution in original post

Highlighted
lwx228
Level VII

Re: How do I ignore errors and let the loop continue while executing a loop in JSL?

OK、Thank Jim!2019-09-28_10-27-54.png

Article Labels

    There are no labels assigned to this post.