/** * @inheritdoc */ protected function setDebugging() { if ($this->getContainer()->getParameter('kernel.debug') === false) { // set error reporting as low as possible error_reporting(0); // don't show error on the screen ini_set('display_errors', 'Off'); // add callback for the spoon exceptionhandler switch ($this->type) { case 'BackendAjax': \Spoon::setExceptionCallback(__CLASS__ . '::exceptionAJAXHandler'); break; default: \Spoon::setExceptionCallback(__CLASS__ . '::exceptionHandler'); } } }