Bitrix Site Manager

SendError

SendError(
 string text,
 string module_id = ""
)

The function SendError sends an error report via the e-mail.

The constant ERROR_EMAIL containing the e-mail address of error message. If you fail to define the constant, the function does not perform any operation. The constant ERROR_EMAIL can be defined in the beginning of a page or in one of the following files:

The sent message includes the following information in addition to error description:

If an error occurs, the function SendError is called by the following methods:

Parameters

ParameterDescription
text Message text.
module_id The module ID whose message is to be sent.

Optional, "" by default.

Example



<?
// file /bitrix/php_interface/dbconn.php

// define ERROR_EMAIL with the administrator e-mail
define("ERROR_EMAIL", "admin@site.com");
?>
<?
SendError("Message!");
?>