Documentation

SystemException

SystemException base class for all exceptions in the system.

D7 core processes errors using the mechanism of exceptions fully similar to the mechanism of php exceptions. When error occurs - an exception is thrown. When error must be processed - exception must be caught.

Similar tools in the old core:

Method Description Available from version
construct creates new exception object.
  • Exceptions in the Bitrix Framework learning course

Examples

// D7
use Bitrix\Main\SystemException;

try
{
    // ...
    throw new SystemException("Error");
}
catch (SystemException $exception)
{
    echo $exception->getMessage();
} 

Exception hierarchy in D7:



User Comments

User comments are not part of official documentation. Use information provided by other users in the comments at your own risk.

The User Comments section is not to be used as a feature discussion board. Only registered users can post comments. Your comment will be visible once it has been approved by the moderator.
© «Bitrix24», 2001-2022
Up