Veikko Mäkinen wrote:
Plain text formating to AgaviException::printStackTrace:


I wrote something for mojavi a while ago, but I've done nothing with it since. Looks like it's pretty much the same as yours but with console colors (*nix). Thought you might like it.

echo("\033[31;1m".$name."\033[0m\n");
echo("\033[31;1m".str_pad("", strlen($name), "-")."\033[0m\n");
echo("\033[1mMessage\033[0m\n \033[31m".wordwrap($message, 75, "\n ")."\033[0m\n");
echo("\033[1mCode\033[0m\n  ".wordwrap($code, 75, "\n  ")."\n");
echo("\033[1mClass\033[0m\n  ".$class."\n");
echo("\033[1mFile\033[0m\n  ".$file."\n");
echo("\033[1mLine\033[0m\n  ".$line."\n");

if (count($trace) > 0) {
    echo("\033[31;1m".'Stack Trace'."\033[0m\n");
    echo("\033[31;1m".str_pad("", strlen('Stack Trace'), "-")."\033[0m\n");
    foreach ($trace as $line) {
        echo($line);
    }
}

echo("\033[31;1m".'Info'."\033[0m\n");
echo("\033[31;1m".str_pad("", strlen('Info'), "-")."\033[0m\n");
echo("\033[1mMojavi Version\033[0m\n  ".MO_APP_VERSION."\n");
echo("\033[1mPHP Version\033[0m\n  ".PHP_VERSION."\n");


Cheers,
Marcel
_______________________________________________
agavi-dev mailing list
agavi-dev@agavi.org
http://labworkz.com/cgi-bin/mailman/listinfo/agavi-dev

Reply via email to