示例#1
0
function handleError(Exception $e)
{
    echo "Server Error: " . $e->getcode();
    $trace = $e->getTrace();
    if ($trace[0]['class'] != "") {
        $class = $trace[0]['class'];
    }
    $method = $trace[0]['function'];
    $file = $trace[0]['file'];
    $line = $trace[0]['line'];
    $Exception_Output = $e->getMessage();
    echo "<br/ >Class & Method: " . $class . "->" . $method . "<br/ >File: " . $file . "[" . $line . "]";
    return $Exception_Output;
}
示例#2
0
<?php

$x = new Exception();
$x->gettraceasstring(1);
$x->gettraceasstring();
$x->__tostring(1);
$x->gettrace(1);
$x->getline(1);
$x->getfile(1);
$x->getmessage(1);
$x->getcode(1);