cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
lwx228
Level VIII

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
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
lwx228
Level VIII

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.
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
lwx228
Level VIII

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