Search

 

Module:Editor

Version:2.2.1 +

Type:Boolean

Category:Document

 

Description

In websites or applications, the ThrowError formula offers a targeted approach to error management. It enables the creation of custom errors tailored to specific scenarios or conditions. In instances where standard Futurama methods fail to flag an error, this formula steps in to forcefully generate the error within the application. This ensures that the error is not only logged but also visibly recognized as an error, enhancing the application's fault-monitoring capabilities. Should there be a need to trigger an exception without it being recorded as an error in the log files, the ThrowException formula serves as the suitable solution.

Configuration

When logging errors using this formula, these will be seen as normale error messages. These are written in the logfiles if the error log is enabled. See the Configuration log page for more information.

Parameters

Message:

Here you can insert the custom text to be displayed when the error is logged. This custom text will be the innermost InnerException of the error.

Example

Description

For this example, create an intent to throw an error via the ThrowError formula. Create a condition that returns a boolean value. If the condition is true, use the ThrowException formula and set the Message to describe the error condition.

Values parameters

Message:

"An intentional error has occurred due to XYZ condition"

Result

When the condition is met in the website or application, the intentional exception will be thrown and recorded in the log.

Note: Ensure that the ThrowError formula is used in a strategic manner to provide meaningful insights into errors or conditions.

Related Topics

- CountErrors

- ReadError

Updated: 2024-04-29