Skip to content

Instantly share code, notes, and snippets.

@brianr
Created July 8, 2014 06:41
Show Gist options
  • Select an option

  • Save brianr/db44a4efb99d00d0c4b1 to your computer and use it in GitHub Desktop.

Select an option

Save brianr/db44a4efb99d00d0c4b1 to your computer and use it in GitHub Desktop.
Rollbar with custom php error handler
<?php
Rollbar::init($config, true, false); // config array, true to install uncaught exception handler, false to not install error handler
function my_error_handler($errno, $errstr, $errfile, $errline) {
Rollbar::report_php_error($errno, $errstr, $errfile, $errline);
// add your own error handling code here
}
set_error_handler('my_error_handler');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment