protected function getExceptionView($className) { // Check if a special view exists for this class if (Controller::viewExists('error/' . $className . '.html.php')) { return 'error/' . $className . '.html.php'; } // Return the default view if non can be found if (!get_parent_class($className)) { return 'error/Exception.html.php'; } // Try with the parent class return $this->getExceptionView(get_parent_class($className)); }