protected function defaultHandler(Application $app)
 {
     $error = error_get_last();
     if ($error['type'] == E_ERROR || $error['type'] == E_COMPILE_ERROR || $error['type'] == E_PARSE || $error['type'] == E_USER_ERROR || $error['type'] == E_RECOVERABLE_ERROR) {
         /*
          * SOAP Errors are handled as exceptions so we need to ignore the fact that soap also places errors on the
          * PHP ErrorLog stack internally.
          */
         if (stristr($error['message'], 'SOAP-ERROR') !== false) {
             return;
         }
         if (isset($app['newrelic'])) {
             $app['newrelic']->noticeError(implode(":", $error));
         }
         ErrorHandler::sendJsonFatalError($error, $app->getAppName());
         exit;
     } else {
         /*
          * @todo add code to handle notices / warnings
          */
     }
 }