function handleException($exception) { if ($exception instanceof StoryException) { $exception->handle(); } else { $content = "<p>" . "An error has occurred. Please try again later. " . "Contact the site administrator if this problem persists." . "</p>"; $simplePage = new SimplePage("Error", null, $content, null, null); $simplePage->render(); } }
public function handle() { $content = "<p>" . "An error has occurred. Please try again later. " . "Contact the site administrator if this problem persists." . "</p>" . "<hr />" . "<p>" . htmlentities($this->getMessage()) . "</p>"; $simplePage = new SimplePage("Error", null, $content, null, null); $simplePage->render(); }