Search

 

Module: Editor

Version: 2.2.1 +

Type: String

Category: Document

 

Description

In a website, errors can occur for different reasons. It is possible that certain external input is incorrect, or that there is an internal cause, an error in the implementation in Futurama. In both cases, you want to prevent that these errors will be displayed in your website, to your visitors. The formulas 'ReadError' and 'CountErrors' can serve as tools to prevent this.
The formula 'CountErrors' can be used to detect whether errors have occured in the website.
After this, the formula 'ReadError' can be used, to display information about what went wrong. This formula returns the text description of the first error or warning that has occured.

Parameters

Warnings:

Here you can choose between True or False. True to return warning description, False to return error description.

Reset:

Here you can choose between True or False. True if error or warning is reset after reading

Example

Description

For this example we create a simple and obvious error in a Futurama implementation:
Create a DataTable with a Row and Colum count of 2. Now create an Index Formula where you refer to the DataTable, and select Row 3. This will obviously result in an error.
Create a WebPage in which you refer to the Index formula. When you visit the website, it will result in an error. Now create the formula 'ReadError' in your webpage. This formula will display the text description of the error thas has occured.

Values parameters

Warnings:

False

Reset:

False

Result

Open your ‘WebPage’ in a browser and see the result.

Note, make sure that the reference to the formulas ‘ReadError’ and ‘CountErrors’ are at the bottom of the Futurama object 'WebPage'. This is because the browser loads the Futurama objects from top to bottom.

Related Topics

- CountErrors

Updated: 2013-06-19