You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This usage example details how to create a notifier instance, set a global notifier instance, register the error handler, and includes a snippet of some code that would report an exception to Airbrake (You can find your project ID and API KEY with your project's settings):
// Create new Notifier instance.$notifier = newAirbrake\Notifier(array(
'projectId' => <Your project ID>,
'projectKey' => '<Your project API KEY>',
));
// Set global notifier instance.Airbrake\Instance::set($notifier);
// Register error and exception handlers.$handler = newAirbrake\ErrorHandler($notifier);
$handler->register();
// Somewhere in the app...try {
thrownewException('hello from phpbrake');
} catch(Exception$e) {
Airbrake\Instance::notify($e);
}
Going further
Check out our official GitHub repo for info on additional features like:
Installation
Example Usage
This usage example details how to create a notifier instance, set a global notifier instance, register the error handler, and includes a snippet of some code that would report an exception to Airbrake (You can find your project ID and API KEY with your project's settings):
Going further
Check out our official GitHub repo for info on additional features like:
The text was updated successfully, but these errors were encountered: