Skip to the content
Documentation

ErrorHandler

No ratings yet

Summary

A list of error codes and which handler to use for it.

Usage

ErrorHandler[<error_code>]=<handler>

Description

This setting sets which Error Handler will be used for each Exponential error code.
It considers the error code as index and the Error Handler as value.

The following error codes for kernel are currently defined:

  • 1 - Access denied
  • 2 - Object not found
  • 3 - Object not available
  • 4 - Object has moved
  • 20 - Module not found
  • 21 - Module view not found
  • 22 - Module or view disabled
  • 50 - No DB connection

The possible error handlers are:

  • displayerror - Displays a text explaining the error.
  • redirect - Redirect to a specific url, which url can be defined in the DefaultRedirectURL setting.
  • rerun - Rerun a module/view on the page, specified by a url, which url can be defined in the DefaultRerunURL setting.
  • embed - Run a module/view and embed the results on the same page used in displayerror Error Handler, or in a custom one, which url can be defined in the DefaultEmbedURL setting.

This setting overrides DefaultErrorHandler.

Examples

ErrorHandler[20]=displayerror

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.