cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.
  • See how to access JMP Marketplace - and - find, create & share add-ins to extend your JMP. Watch video.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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

Recommended Articles