コード例 #1
0
/**
 * called on application shutdown
 * check if shutdown was caused by error and write it to log
 */
function ac_shutdown_handler()
{
    $error = error_get_last();
    if (!is_array($error) || !in_array($error['type'], array(E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR))) {
        return null;
    }
    $exception = new AException($error['type'], $error['message'], $error['file'], $error['line']);
    $exception->logError();
}
コード例 #2
0
 public function __construct($errno, $errstr, $errfile, $errline)
 {
     $this->file = $errfile;
     $this->line = $errline;
     parent::__construct($errno, $errstr);
 }
コード例 #3
0
ファイル: PHPErrorException.php プロジェクト: askzap/ultimate
 public function __construct($message, $type, $filename, $line_number)
 {
     parent::__construct($message, $type);
     $this->file = $filename;
     $this->line = $line_number;
 }