Search

 

Module:Editor

Version:24.03 +

Type:Boolean

Category:Document

 

Description

In a website or application, intentional exceptions can be set to identify and track specific errors. The ThrowException formula allows to externally throw custom exceptions for specific errors or conditions. (Same as ThrowError but without error in the log).This formula was added to enhance the clarity of log files.

Configuration

To log these intentional exceptions, set the following in the config within the log section:

<intentionalexceptions value="true">

Parameters

Exception Text:

Here you can insert the custom text to be displayed when the exception is logged.

Example

Description

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

Values parameters

Exception Text:

"An intentional exception 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 ThrowException formula is used in a strategic manner to provide meaningful insights into errors or conditions.

Related Topics

- CountException

- ReadException

Updated: 2024-04-04