A New Way to Handle Errors
We’ve recently introduced a new error-handling mechanism using the new throw() command.
This marked the first step towards a new error handling system, positioned as close as possible to the code generating them.
In the next phase with 4D v20 R4, we’re expanding this approach to intercept errors during expression execution.
Let’s delve into the details.
Enhanced Error Management in 4D Code
Throwing errors in your 4D code is now possible starting from v20R2.
Those errors behave as any 4D error: they trigger an error dialog or can be handled in an ON ERR CALL method.
This feature will ease your life because you’ll be able to improve the quality of your code by proactively detecting errors as soon as they occur. You can also handle better error logging.
Before digging into details, It’s important to note that this feature is the first step towards achieving robust error management.
Now, let’s dig into the details!