protected function callFunction($controller, $functionName, $parameters) { // Catch all exceptions rather than letting them hit the top level exception handler. try { parent::callFunction($controller, $functionName, $parameters); } catch (Exception $e) { $this->view->displayError(500, $e); exit(500); } }