cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

on error- continue the calculation

payman
13-Aquamarine

on error- continue the calculation

Hello All,

I am running my program for a few thousand cases. Unfortunately when one case has error, the program stops on that case. How can I address the program to jump over the erroneous cases and continue the calculation?

Another question: is it possible to find out about the progression, for example how many cases has been left or required time estimation?

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
MikeArmstrong
5-Regular Member
(To:payman)

Please post a worksheet.

From your description the 'onerror' function might work.

View solution in original post

2 REPLIES 2
MikeArmstrong
5-Regular Member
(To:payman)

Please post a worksheet.

From your description the 'onerror' function might work.

Werner_E
24-Ruby V
(To:payman)

You sure would have to be more precise about the nature of the "program" you are running.

In general the approach would be to protect a critical calculation which could throw an error by the "on error" command (or "try" in Prime) which could return a string or NaN in case the calculation fails. This return value them can be used in a conditional branch.

Top Tags