Bitrix Site Manager

CApplicationException

CApplicationException(
 string msg,
 mixed id = false
)

Creates an instance of the CApplicationException class with the text msg and the code id.

Parameters

ParameterDescription
msg Error description.
id The error ID.

Remarks

To raise exceptions it is recommended to call $APPLICATION->ThrowException directly. This constructor is mainly intended as the template for the custom exception classes inherited from CApplicationException.

See Also

Example



<?
$exception = new CApplicationException("File is not found", BX_E_FILE_NOT_FOUND);
$APPLICATION->ThrowException($exception); 
?>