\Raven_ErrorHandler

Event handlers for exceptions and errors

$client = new Raven_Client('http://public:secret/example.com/1'); $error_handler = new Raven_ErrorHandler($client); $error_handler->registerExceptionHandler(); $error_handler->registerErrorHandler(); $error_handler->registerShutdownFunction();

Summary

Methods
Properties
Constants
__construct()
bitwiseOr()
handleException()
handleError()
handleFatalError()
shouldCaptureFatalError()
registerExceptionHandler()
registerErrorHandler()
registerShutdownFunction()
No public properties found
No constants found
No protected methods found
$old_exception_handler
$call_existing_exception_handler
$old_error_handler
$call_existing_error_handler
$reservedMemory
$client
$send_errors_last
$fatal_error_types
$error_types
N/A
No private methods found
$lastHandledException
N/A

Properties

$old_exception_handler

$old_exception_handler : 

Type

$call_existing_exception_handler

$call_existing_exception_handler : 

Type

$old_error_handler

$old_error_handler : 

Type

$call_existing_error_handler

$call_existing_error_handler : 

Type

$reservedMemory

$reservedMemory : 

Type

$send_errors_last

$send_errors_last : 

Type

$fatal_error_types

$fatal_error_types : 

Type

$error_types

$error_types : array

Type

array — Error types which should be processed by the handler. A 'null' value implies "whatever error_reporting is at time of error".

$lastHandledException

$lastHandledException : \Exception|null

Type

\Exception|null

Methods

__construct()

__construct(  $client,   $send_errors_last = false,   $error_types = null,   $__error_types = null) 

Parameters

$client
$send_errors_last
$error_types
$__error_types

bitwiseOr()

bitwiseOr(  $a,   $b) 

Parameters

$a
$b

handleException()

handleException(  $e,   $isError = false,   $vars = null) 

Parameters

$e
$isError
$vars

handleError()

handleError(  $type,   $message,   $file = '',   $line,   $context = array()) 

Parameters

$type
$message
$file
$line
$context

handleFatalError()

handleFatalError() 

shouldCaptureFatalError()

shouldCaptureFatalError(integer  $type, string|null  $message = null) : boolean

Parameters

integer $type
string|null $message

Returns

boolean

registerExceptionHandler()

registerExceptionHandler(boolean  $call_existing = true) : \Raven_ErrorHandler

Register a handler which will intercept unhandled exceptions and report them to the associated Sentry client.

Parameters

boolean $call_existing

Call any existing exception handlers after processing this instance.

Returns

\Raven_ErrorHandler

registerErrorHandler()

registerErrorHandler(boolean  $call_existing = true, array  $error_types = null) : \Raven_ErrorHandler

Register a handler which will intercept standard PHP errors and report them to the associated Sentry client.

Parameters

boolean $call_existing

Call any existing errors handlers after processing this instance.

array $error_types

All error types that should be sent.

Returns

\Raven_ErrorHandler

registerShutdownFunction()

registerShutdownFunction(integer  $reservedMemorySize = 10) : \Raven_ErrorHandler

Register a fatal error handler, which will attempt to capture errors which shutdown the PHP process. These are commonly things like OOM or timeouts.

Parameters

integer $reservedMemorySize

Number of kilobytes memory space to reserve, which is utilized when handling fatal errors.

Returns

\Raven_ErrorHandler