code/libraries/joomlatools/library/exception/handler/abstract.php
public function handleException(\Exception $exception)
    {
        try
        {
            //Try to handle the exception
            foreach($this->getExceptionCallbacks() as $handler)
            {
                if(call_user_func_array($handler, array(&$exception)) === true)
                {
                    $this->__exceptions->push($exception);
                    return true;
                };
            }
        }
        catch (Exception $e)
        {
            $message  = "<p><strong>%s</strong>: '%s' thrown in <strong>%s</strong> on line <strong>%s</strong></p>";
            $message .= "<p>while handling exception</p>";
            $message .= "<p><strong>%s</strong>: '%s' thrown in <strong>%s</strong> on line <strong>%s</strong></p>";
            $message .= "<h3>Stacktrace</h3><pre>%s</pre>";

            $message = sprintf($message,
                get_class($e),
                $e->getMessage(),
                $e->getFile(),
                $e->getLine(),
                get_class($exception),
                $exception->getMessage(),
                $exception->getFile(),
                $exception->getLine(),
                $exception->getTraceAsString()
            );

            //Make sure the output buffers are cleared
            $level = ob_get_level();
            while($level > 0) {
                ob_end_clean();
                $level--;
            }

            if (ini_get('display_errors')) {
                echo $message;
            }

            if (ini_get('log_errors')) {
                error_log($message);
            }

            exit(0);
        }

        return false;
    }
public function handleException(\Exception $exception)
    {
        try
        {
            //Try to handle the exception
            foreach($this->getExceptionCallbacks() as $handler)
            {
                if(call_user_func_array($handler, array(&$exception)) === true)
                {
                    $this->__exceptions->push($exception);
                    return true;
                };
            }
        }
        catch (Exception $e)
        {
            $message  = "<p><strong>%s</strong>: '%s' thrown in <strong>%s</strong> on line <strong>%s</strong></p>";
            $message .= "<p>while handling exception</p>";
            $message .= "<p><strong>%s</strong>: '%s' thrown in <strong>%s</strong> on line <strong>%s</strong></p>";
            $message .= "<h3>Stacktrace</h3><pre>%s</pre>";

            $message = sprintf($message,
                get_class($e),
                $e->getMessage(),
                $e->getFile(),
                $e->getLine(),
                get_class($exception),
                $exception->getMessage(),
                $exception->getFile(),
                $exception->getLine(),
                $exception->getTraceAsString()
            );

            //Make sure the output buffers are cleared
            $level = ob_get_level();
            while($level > 0) {
                ob_end_clean();
                $level--;
            }

            if (ini_get('display_errors')) {
                echo $message;
            }

            if (ini_get('log_errors')) {
                error_log($message);
            }

            exit(0);
        }

        return false;
    }
public function handleException ( \ Exception $ exception ) { try { //Try to handle the exception foreach ( $ this -> getExceptionCallbacks ( ) as $ handler ) { if ( call_user_func_array ( $ handler , array ( & $ exception ) ) === true ) { $ this -> __exceptions -> push ( $ exception ) ; return true ; } ; } } catch ( Exception $ e ) { $ message = "<p><strong>%s</strong>: '%s' thrown in <strong>%s</strong> on line <strong>%s</strong></p>" ; $ message .= "<p>while handling exception</p>" ; $ message .= "<p><strong>%s</strong>: '%s' thrown in <strong>%s</strong> on line <strong>%s</strong></p>" ; $ message .= "<h3>Stacktrace</h3><pre>%s</pre>" ; $ message = sprintf ( $ message , get_class ( $ e ) , $ e -> getMessage ( ) , $ e -> getFile ( ) , $ e -> getLine ( ) , get_class ( $ exception ) , $ exception -> getMessage ( ) , $ exception -> getFile ( ) , $ exception -> getLine ( ) , $ exception -> getTraceAsString ( ) ) ; //Make sure the output buffers are cleared $ level = ob_get_level ( ) ; while ( $ level > 0 ) { ob_end_clean ( ) ; $ level -- ; } if ( ini_get ( 'display_errors' ) ) { echo $ message ; } if ( ini_get ( 'log_errors' ) ) { error_log ( $ message ) ; } exit ( 0 ) ; } return false ; }
Handle an exception by calling all callbacks that have registered to receive it.

If an exception callback returns TRUE the exception handling will be aborted, otherwise the next callback will be
called, until all callbacks have gotten a change to handle the exception.

@param  \Exception  $exception  The exception to be handled
@return bool  If the exception was handled return TRUE, otherwise false
Handle an exception by calling all callbacks that have registered to receive it .