lib/ezutils/classes/ezexecution.php
static public function defaultExceptionHandler( $e )
    {
        if( PHP_SAPI != 'cli' )
        {
            header( 'HTTP/1.x 500 Internal Server Error' );
            header( 'Content-Type: text/html' );

            echo "An unexpected error has occurred. Please contact the webmaster.<br />";

            if( eZDebug::isDebugEnabled() )
            {
                echo $e->getMessage() . ' in ' . $e->getFile() . ' on line ' . $e->getLine();
            }
        }
        else
        {
            $cli = eZCLI::instance();
            $cli->error( "An unexpected error has occurred. Please contact the webmaster.");

            if( eZDebug::isDebugEnabled() )
            {
                $cli->error( $e->getMessage() . ' in ' . $e->getFile() . ' on line ' . $e->getLine() );
            }
        }

        eZLog::write( 'Unexpected error, the message was : ' . $e->getMessage() . ' in ' . $e->getFile() . ' on line ' . $e->getLine(), 'error.log' );

        eZExecution::cleanup();
        eZExecution::setCleanExit();
        exit( 1 );
    }
static public function defaultExceptionHandler( $e )
    {
        if( PHP_SAPI != 'cli' )
        {
            header( 'HTTP/1.x 500 Internal Server Error' );
            header( 'Content-Type: text/html' );

            echo "An unexpected error has occurred. Please contact the webmaster.<br />";

            if( eZDebug::isDebugEnabled() )
            {
                echo $e->getMessage() . ' in ' . $e->getFile() . ' on line ' . $e->getLine();
            }
        }
        else
        {
            $cli = eZCLI::instance();
            $cli->error( "An unexpected error has occurred. Please contact the webmaster.");

            if( eZDebug::isDebugEnabled() )
            {
                $cli->error( $e->getMessage() . ' in ' . $e->getFile() . ' on line ' . $e->getLine() );
            }
        }

        eZLog::write( 'Unexpected error, the message was : ' . $e->getMessage() . ' in ' . $e->getFile() . ' on line ' . $e->getLine(), 'error.log' );

        eZExecution::cleanup();
        eZExecution::setCleanExit();
        exit( 1 );
    }
static public function defaultExceptionHandler ( $ e ) { if ( PHP_SAPI != 'cli' ) { header ( 'HTTP/1.x 500 Internal Server Error' ) ; header ( 'Content-Type: text/html' ) ; echo "An unexpected error has occurred. Please contact the webmaster.<br />" ; if ( eZDebug :: isDebugEnabled ( ) ) { echo $ e -> getMessage ( ) . ' in ' . $ e -> getFile ( ) . ' on line ' . $ e -> getLine ( ) ; } } else { $ cli = eZCLI :: instance ( ) ; $ cli -> error ( "An unexpected error has occurred. Please contact the webmaster." ) ; if ( eZDebug :: isDebugEnabled ( ) ) { $ cli -> error ( $ e -> getMessage ( ) . ' in ' . $ e -> getFile ( ) . ' on line ' . $ e -> getLine ( ) ) ; } } eZLog :: write ( 'Unexpected error, the message was : ' . $ e -> getMessage ( ) . ' in ' . $ e -> getFile ( ) . ' on line ' . $ e -> getLine ( ) , 'error.log' ) ; eZExecution :: cleanup ( ) ; eZExecution :: setCleanExit ( ) ; exit ( 1 ) ; }
Installs the default Exception handler

@params Exception|Throwable the exception
@return void
Installs the default Exception handler