public static function render($e)
    {
        $lines = null;

        foreach (self::__nearByLines($e->getLine(), $e->getFile()) as $line => $string) {
            $lines .= sprintf(
                '<li%s><strong>%d</strong> <code>%s</code></li>',
                (($line+1) == $e->getLine() ? ' class="error"' : null),
                ++$line,
                str_replace("\t", '&nbsp;&nbsp;&nbsp;&nbsp;', htmlspecialchars($string))
            );
        }

        $trace = null;

        foreach ($e->getTrace() as $t) {
            $trace .= sprintf(
                '<li><code><em>[%s:%d]</em></code></li><li><code>&#160;&#160;&#160;&#160;%s%s%s();</code></li>',
                (isset($t['file']) ? $t['file'] : null),
                (isset($t['line']) ? $t['line'] : null),
                (isset($t['class']) ? $t['class'] : null),
                (isset($t['type']) ? $t['type'] : null),
                $t['function']
            );
        }

        $queries = null;

        if (is_object(Symphony::Database())) {
            $debug = Symphony::Database()->debug();

            if (!empty($debug)) {
                foreach ($debug as $query) {
                    $queries .= sprintf(
                        '<li><em>[%01.4f]</em><code> %s;</code> </li>',
                        (isset($query['execution_time']) ? $query['execution_time'] : null),
                        htmlspecialchars($query['query'])
                    );
                }
            }
        }

        return self::renderHtml(
            'fatalerror.generic',
            ($e instanceof ErrorException ? GenericErrorHandler::$errorTypeStrings[$e->getSeverity()] : 'Fatal Error'),
            $e->getMessage(),
            $e->getFile(),
            $e->getLine(),
            $lines,
            $trace,
            $queries
        );
    }
public static function render($e)
    {
        $lines = null;

        foreach (self::__nearByLines($e->getLine(), $e->getFile()) as $line => $string) {
            $lines .= sprintf(
                '<li%s><strong>%d</strong> <code>%s</code></li>',
                (($line+1) == $e->getLine() ? ' class="error"' : null),
                ++$line,
                str_replace("\t", '&nbsp;&nbsp;&nbsp;&nbsp;', htmlspecialchars($string))
            );
        }

        $trace = null;

        foreach ($e->getTrace() as $t) {
            $trace .= sprintf(
                '<li><code><em>[%s:%d]</em></code></li><li><code>&#160;&#160;&#160;&#160;%s%s%s();</code></li>',
                (isset($t['file']) ? $t['file'] : null),
                (isset($t['line']) ? $t['line'] : null),
                (isset($t['class']) ? $t['class'] : null),
                (isset($t['type']) ? $t['type'] : null),
                $t['function']
            );
        }

        $queries = null;

        if (is_object(Symphony::Database())) {
            $debug = Symphony::Database()->debug();

            if (!empty($debug)) {
                foreach ($debug as $query) {
                    $queries .= sprintf(
                        '<li><em>[%01.4f]</em><code> %s;</code> </li>',
                        (isset($query['execution_time']) ? $query['execution_time'] : null),
                        htmlspecialchars($query['query'])
                    );
                }
            }
        }

        return self::renderHtml(
            'fatalerror.generic',
            ($e instanceof ErrorException ? GenericErrorHandler::$errorTypeStrings[$e->getSeverity()] : 'Fatal Error'),
            $e->getMessage(),
            $e->getFile(),
            $e->getLine(),
            $lines,
            $trace,
            $queries
        );
    }
public static function render ( $ e ) { $ lines = null ; foreach ( self :: __nearByLines ( $ e -> getLine ( ) , $ e -> getFile ( ) ) as $ line => $ string ) { $ lines .= sprintf ( '<li%s><strong>%d</strong> <code>%s</code></li>' , ( ( $ line + 1 ) == $ e -> getLine ( ) ? ' class="error"' : null ) , ++ $ line , str_replace ( "\t" , '&nbsp;&nbsp;&nbsp;&nbsp;' , htmlspecialchars ( $ string ) ) ) ; } $ trace = null ; foreach ( $ e -> getTrace ( ) as $ t ) { $ trace .= sprintf ( '<li><code><em>[%s:%d]</em></code></li><li><code>&#160;&#160;&#160;&#160;%s%s%s();</code></li>' , ( isset ( $ t [ 'file' ] ) ? $ t [ 'file' ] : null ) , ( isset ( $ t [ 'line' ] ) ? $ t [ 'line' ] : null ) , ( isset ( $ t [ 'class' ] ) ? $ t [ 'class' ] : null ) , ( isset ( $ t [ 'type' ] ) ? $ t [ 'type' ] : null ) , $ t [ 'function' ] ) ; } $ queries = null ; if ( is_object ( Symphony :: Database ( ) ) ) { $ debug = Symphony :: Database ( ) -> debug ( ) ; if ( ! empty ( $ debug ) ) { foreach ( $ debug as $ query ) { $ queries .= sprintf ( '<li><em>[%01.4f]</em><code> %s;</code> </li>' , ( isset ( $ query [ 'execution_time' ] ) ? $ query [ 'execution_time' ] : null ) , htmlspecialchars ( $ query [ 'query' ] ) ) ; } } } return self :: renderHtml ( 'fatalerror.generic' , ( $ e instanceof ErrorException ? GenericErrorHandler :: $ errorTypeStrings [ $ e -> getSeverity ( ) ] : 'Fatal Error' ) , $ e -> getMessage ( ) , $ e -> getFile ( ) , $ e -> getLine ( ) , $ lines , $ trace , $ queries ) ; }
The render function will take an Throwable and output a HTML page

@since Symphony 2.7.0
This function works with both Exception and Throwable

@param Throwable $e
The Throwable object
@return string
An HTML string
The render function will take an Throwable and output a HTML page