Mathijs wrote:
> Hello there,
> 
> Is there a way to color exceptions/errors? 

I recommend a combination of php & html (maybe with some css and
javascript thrown in for good measure)

e.g. (ripped straight from zend.com):

<?php

        function printException(Exception $e) {
            print "<h1>".get_class($e)."</h1>\n";
            print "<h2>{$e->getMessage()}
                ({$e->getCode()})</h2>\n\n";
            print "file: {$e->getFile()}<br />\n";
            print "line: {$e->getLine()}<br />\n";
            print $e->getTraceAsString();
        }

?>

STFW if you want something more sophisticated.

> I try d to use highlight_string() but that only works on PHP code.
> 
> Does someone has a function or something which can do this?
> 
> Thx in advance.
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to