PHP 클래스 Jyxo\ErrorHandler

저자: Jaroslav Hanslík
파일 보기 프로젝트 열기: jyxo/php

공개 메소드들

메소드 설명
__construct ( ) Constructor preventing from creating class instances.
exception ( Exception $exception, boolean $fire = true ) : boolean Adds a caught exception.
handleError ( integer $type, string $message, string $file, integer $line, array $context ) : boolean Handles errors and logs them.
handleException ( Exception $exception ) Catches exceptions and logs them.
handleFatalError ( ) Handles critical errors and logs them.
init ( boolean $debug = false ) Initializes error handling.
log ( array $message, boolean $fire = true ) : boolean Logs a message.
setErrorMail ( Jyxo\ErrorMail $errorMail ) Sets \Jyxo\ErrorMail instance for sending fatal error emails (used by the shutdown function and error handler).

비공개 메소드들

메소드 설명
firephp ( array $message ) : boolean Sends a message to FirePHP.
getAllPreviousExceptions ( Exception $exception ) : array Returns all exception's previous exceptions.
getTraceLog ( array $trace ) : string Returns trace log.

메소드 상세

__construct() 최종 공개 메소드

Constructor preventing from creating class instances.
final public __construct ( )

exception() 공개 정적인 메소드

Adds a caught exception.
public static exception ( Exception $exception, boolean $fire = true ) : boolean
$exception Exception Caught exception
$fire boolean Shall we use FirePHP?
리턴 boolean

handleError() 공개 정적인 메소드

Handles errors and logs them.
public static handleError ( integer $type, string $message, string $file, integer $line, array $context ) : boolean
$type integer Error type
$message string Error message
$file string File where the error occurred
$line integer Line on which the error occurred
$context array Error context variables
리턴 boolean Was the error processed?

handleException() 공개 정적인 메소드

Catches exceptions and logs them.
public static handleException ( Exception $exception )
$exception Exception Uncaught exception

handleFatalError() 공개 정적인 메소드

Handles critical errors and logs them.
public static handleFatalError ( )

init() 공개 정적인 메소드

Initializes error handling.
public static init ( boolean $debug = false )
$debug boolean Turn debugging on?

log() 공개 정적인 메소드

Logs a message.
public static log ( array $message, boolean $fire = true ) : boolean
$message array Message definition
$fire boolean Shall we use FirePHP?
리턴 boolean Was logging successful?

setErrorMail() 공개 정적인 메소드

Sets \Jyxo\ErrorMail instance for sending fatal error emails (used by the shutdown function and error handler).
public static setErrorMail ( Jyxo\ErrorMail $errorMail )
$errorMail Jyxo\ErrorMail