lib/traits/common.php
protected function catchException(\Exception $exception, $notifier = null)
    {
        global $USER;

        $this->abortCache();

        if ($USER->IsAdmin())
        {
            $this->showExceptionAdmin($exception);
        }
        else
        {
            $this->showExceptionUser($exception);
        }

        if (($notifier === true) || ($this->exceptionNotifier && $notifier !== false) && BX_EXC_NOTIFY !== false)
        {
            $this->sendNotifyException($exception);
        }
    }
protected function catchException(\Exception $exception, $notifier = null)
    {
        global $USER;

        $this->abortCache();

        if ($USER->IsAdmin())
        {
            $this->showExceptionAdmin($exception);
        }
        else
        {
            $this->showExceptionUser($exception);
        }

        if (($notifier === true) || ($this->exceptionNotifier && $notifier !== false) && BX_EXC_NOTIFY !== false)
        {
            $this->sendNotifyException($exception);
        }
    }
protected function catchException ( \ Exception $ exception , $ notifier = null ) { global $ USER ; $ this -> abortCache ( ) ; if ( $ USER -> IsAdmin ( ) ) { $ this -> showExceptionAdmin ( $ exception ) ; } else { $ this -> showExceptionUser ( $ exception ) ; } if ( ( $ notifier === true ) || ( $ this -> exceptionNotifier && $ notifier !== false ) && BX_EXC_NOTIFY !== false ) { $ this -> sendNotifyException ( $ exception ) ; } }
Called when an error occurs

Resets the cache, show error message (two mode: for users and for admins),
sending notification to admin email

@param \Exception $exception
@param bool $notifier Sent notify to admin email. Default — value of property $this->exceptionNotifier
@uses exceptionNotifier
Called when an error occurs