PHP 클래스 SimpleSAML_Error_Exception, simplesamlphp

This class tries to make sure that every exception is serializable.
저자: Thomas Graff ([email protected])
상속: extends Exception
파일 보기 프로젝트 열기: simplesamlphp/simplesamlphp 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $message, integer $code, Exception $cause = null ) Constructor for this error.
__sleep ( ) : array Function for serialization.
format ( boolean $anonymize = false ) : array Format this exception for logging.
formatBacktrace ( boolean $anonymize = false ) : array Format the backtrace for logging.
fromException ( Exception $e ) : SimpleSAML_Error_Exception Convert any exception into a SimpleSAML_Error_Exception.
getBacktrace ( ) : array Retrieve the backtrace.
getCause ( ) : SimpleSAML_Error_Exception | null Retrieve the cause of this exception.
getClass ( ) : string Retrieve the class of this exception.
log ( integer $default_level ) Print the exception to the log, by default with log level error.
logDebug ( ) Print the exception to the log with log level debug.
logError ( ) Print the exception to the log with log level error.
logInfo ( ) Print the exception to the log with log level info.
logWarning ( ) Print the exception to the log with log level warning.

보호된 메소드들

메소드 설명
initBacktrace ( Exception $exception ) Load the backtrace from the given exception.
logBacktrace ( $level = SimpleSAML\Logger::DEBUG ) Print the backtrace to the log if the 'debug' option is enabled in the configuration.

메소드 상세

__construct() 공개 메소드

Note that the cause will be converted to a SimpleSAML_Error_UnserializableException unless it is a subclass of SimpleSAML_Error_Exception.
public __construct ( string $message, integer $code, Exception $cause = null )
$message string Exception message
$code integer Error code
$cause Exception The cause of this exception.

__sleep() 공개 메소드

This function builds a list of all variables which should be serialized. It will serialize all variables except the Exception::trace variable.
public __sleep ( ) : array
리턴 array Array with the variables that should be serialized.

format() 공개 메소드

Create an array of lines for logging.
public format ( boolean $anonymize = false ) : array
$anonymize boolean Whether the resulting messages should be anonymized or not.
리턴 array Log lines that should be written out.

formatBacktrace() 공개 메소드

Create an array of lines for logging from the backtrace.
public formatBacktrace ( boolean $anonymize = false ) : array
$anonymize boolean Whether the resulting messages should be anonymized or not.
리턴 array All lines of the backtrace, properly formatted.

fromException() 공개 정적인 메소드

Convert any exception into a SimpleSAML_Error_Exception.
public static fromException ( Exception $e ) : SimpleSAML_Error_Exception
$e Exception The exception.
리턴 SimpleSAML_Error_Exception The new exception.

getBacktrace() 공개 메소드

Retrieve the backtrace.
public getBacktrace ( ) : array
리턴 array An array where each function call is a single item.

getCause() 공개 메소드

Retrieve the cause of this exception.
public getCause ( ) : SimpleSAML_Error_Exception | null
리턴 SimpleSAML_Error_Exception | null The cause of this exception.

getClass() 공개 메소드

Retrieve the class of this exception.
public getClass ( ) : string
리턴 string The name of the class.

initBacktrace() 보호된 메소드

Load the backtrace from the given exception.
protected initBacktrace ( Exception $exception )
$exception Exception The exception we should fetch the backtrace from.

log() 공개 메소드

Override to allow errors extending this class to specify the log level themselves.
public log ( integer $default_level )
$default_level integer The log level to use if this method was not overridden.

logBacktrace() 보호된 메소드

Print the backtrace to the log if the 'debug' option is enabled in the configuration.
protected logBacktrace ( $level = SimpleSAML\Logger::DEBUG )

logDebug() 공개 메소드

This function will write this exception to the log, including a full backtrace.
public logDebug ( )

logError() 공개 메소드

This function will write this exception to the log, including a full backtrace.
public logError ( )

logInfo() 공개 메소드

This function will write this exception to the log, including a full backtrace.
public logInfo ( )

logWarning() 공개 메소드

This function will write this exception to the log, including a full backtrace.
public logWarning ( )