Programming: Catching Errors (try/on error operator) in Mathcad Prime

Опубликовано: 11 Октябрь 2024
на канале: Mathcad, a PTC Technology
1,381
8

With PTC Mathcad Prime's "try/on error" programming operator, you can catch and deal with potential errors in your program before they occur. For example, you can use the error condition to return a variable for debugging purposes, perform an alternate calculation, or exit the program and return a custom error message.

Mathcad Help has another great example that you can copy-paste into your worksheets on using the try/on error programming operator: https://support.ptc.com/help/mathcad/...

PTC Mathcad Prime's programming features are valuable and powerful functionality only available in the premium version of the product. You can, for free, try out the latest version of PTC Mathcad Prime with all of its features enabled by going to https://www.mathcad.com/trial

00:00 Avoid division by zero error
01:18 Avoid no matching value found error
02:20 Error-catching the Newton-Raphsons Algorithm