Constant summary
- HANDLED_PHP_SEVERITIES
- STRICT_ATTITUTE_PHP_SEVERITIES
- LOG_FILE_EXTENSION
- DEFAULT_500_DEV_VIEW
- DEFAULT_STATUS_DEV_VIEW
- DEFAULT_STATUS_LIVE_VIEW
- MEMORY_LIMIT_EXHAUSTED_ERROR_MSG
- POST_LENGTH_ERROR_MSG_PREFIX
- UPLOAD_NUM_ERROR_MSG_PREFIX
- INPUT_VARS_NUM_ERROR_MSG_PREFIX
Methods summary
Modifier and Type | Method |
---|---|
public | __construct ( bool developmentMode ) |
public | setDetectStartupErrorsEnabled ( bool detectStartupErrorsEnabled ) |
public | isDetectStartupErrorsEnabled ( ) |
public | setDetectBadRequestsOnStartupEnabled ( bool detectBadRequestsOnStartup ) |
public | isDetectBadRequestsOnStartupEnabled ( ) |
public | setStrictAttitude ( bool strictAttitude ) |
public boolean | isStrictAttitude ( ) |
public | setLogDetailDirPath ( string dirPath , string filePerm ) |
public | setLogMailRecipient ( string mailRecipient , string mailAddresser ) |
public | setLogMailBufferDirPath ( string logMailBufferDirPath ) |
public | setLogStatusExceptionsEnabled ( unknown logStatusExceptionsEnabled , array logExcludedHttpStatus ) |
public | setLogger ( Logger logger ) |
public boolean | errorOccurred ( ) |
public boolean | isStable ( ) |
public | ignoreNextTriggeredErrNo ( int errNo ) |
public | getIgnoredErrorMessage ( ) |
public boolean | handleTriggeredError ( string errno , string errstr , string errfile , string errline , unknown errcontext = null , unknown forceThrow = false ) |
public | handleThrowable ( Throwable throwable , unknown logException = true , bool dispatchException = true ) |
public | checkForStartupErrors ( ) |
public | checkForFatalErrors ( ) |
Constants in detail
-
HANDLED_PHP_SEVERITIES
const HANDLED_PHP_SEVERITIES
-
STRICT_ATTITUTE_PHP_SEVERITIES
const STRICT_ATTITUTE_PHP_SEVERITIES
-
LOG_FILE_EXTENSION
const LOG_FILE_EXTENSION
-
DEFAULT_500_DEV_VIEW
const DEFAULT_500_DEV_VIEW
-
DEFAULT_STATUS_DEV_VIEW
const DEFAULT_STATUS_DEV_VIEW
-
DEFAULT_STATUS_LIVE_VIEW
const DEFAULT_STATUS_LIVE_VIEW
-
MEMORY_LIMIT_EXHAUSTED_ERROR_MSG
const MEMORY_LIMIT_EXHAUSTED_ERROR_MSG
If the passed error was triggered because of an autoloading error, this method returns the correspondent TypeLoaderException.param
string errnostring errstrstring errfilestring errlinereturn
n2n\core\err\TypeLoaderErrorException -
POST_LENGTH_ERROR_MSG_PREFIX
const POST_LENGTH_ERROR_MSG_PREFIX
-
UPLOAD_NUM_ERROR_MSG_PREFIX
const UPLOAD_NUM_ERROR_MSG_PREFIX
-
INPUT_VARS_NUM_ERROR_MSG_PREFIX
const INPUT_VARS_NUM_ERROR_MSG_PREFIX
Methods in detail
-
__construct
public __construct ( bool developmentMode )param
bool developmentMode -
setDetectStartupErrorsEnabled
public setDetectStartupErrorsEnabled ( bool detectStartupErrorsEnabled ) -
isDetectStartupErrorsEnabled
public isDetectStartupErrorsEnabled ( ) -
setDetectBadRequestsOnStartupEnabled
public setDetectBadRequestsOnStartupEnabled ( bool detectBadRequestsOnStartup ) -
isDetectBadRequestsOnStartupEnabled
public isDetectBadRequestsOnStartupEnabled ( ) -
setStrictAttitude
public setStrictAttitude ( bool strictAttitude )Method do enabled or disable strict exception handling. If strict attitude is enabled php warnings will cause exceptionsparam
bool strictAttitude if true strictAttitude is enabled -
isStrictAttitude
boolean public isStrictAttitude ( )return
boolean -
setLogDetailDirPath
public setLogDetailDirPath ( string dirPath , string filePerm )If dirPath and filePerm are set, the exception handler creates a detailed info file about every exception handled by this exception handler.param
string dirPath directory within the info files are createdstring filePerm file permissions to use for new info files -
setLogMailRecipient
public setLogMailRecipient ( string mailRecipient , string mailAddresser )If mailRecipient and mailAddresser are set, the exception handler sends an mail when an exception was handled by this exception handler.param
string mailRecipientstring mailAddresser -
setLogMailBufferDirPath
public setLogMailBufferDirPath ( string logMailBufferDirPath )param
string logMailBufferDirPath -
setLogStatusExceptionsEnabled
public setLogStatusExceptionsEnabled ( unknown logStatusExceptionsEnabled , array logExcludedHttpStatus ) -
setLogger
-
errorOccurred
boolean public errorOccurred ( )Tells you whether or not an excpetion is occurred and a exception screen was rendered.
NOTICE: If a warning or notice was triggered and strict attitude is disabled this method returns false
return
boolean -
isStable
boolean public isStable ( )If stable is false the exception hanlder wasn't able to use the N2N api due to a fatal error and had to access the ob buffer in a dirty way.return
boolean -
ignoreNextTriggeredErrNo
public ignoreNextTriggeredErrNo ( int errNo ) -
getIgnoredErrorMessage
public getIgnoredErrorMessage ( ) -
handleTriggeredError
boolean public handleTriggeredError ( string errno , string errstr , string errfile , string errline , unknown errcontext = null , unknown forceThrow = false ) -
handleThrowable
public handleThrowable ( Throwable throwable , unknown logException = true , bool dispatchException = true )Will be registered as php exception_handler while ExceptionHandler initializationsee
n2n\core\err\http://php.net/manual/de/function.set-exception-handler.phpparam
Throwable throwablebool dispatchException if true response will be reseted and an exception view will be shown -
checkForStartupErrors
public checkForStartupErrors ( ) -
checkForFatalErrors
public checkForFatalErrors ( )Is called from N2N after shutdown was performed to detect and handle fatal errors which weren't handled yet.
author