protected function _displayError($error, $debug) { $Whoops = new \Whoops\Run(); $Whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler()); return $Whoops->handleError(Configure::read('Error.errorLevel'), $error); }