From ad16488643017f293dda6b226024751d15cb4426 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 18 May 2009 06:30:32 +0000 Subject: Turn on IN_PRODUCTION mode now across the board. Create our own error page where we'll show whatever information is useful. Get rid of the IN_PRODUCTION hack in MY_View.php that we no longer need. --- core/libraries/MY_View.php | 7 +-- core/views/kohana_error_page.php | 118 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+), 6 deletions(-) create mode 100644 core/views/kohana_error_page.php (limited to 'core') diff --git a/core/libraries/MY_View.php b/core/libraries/MY_View.php index 15f4d6a4..836d1087 100644 --- a/core/libraries/MY_View.php +++ b/core/libraries/MY_View.php @@ -27,7 +27,7 @@ class View extends View_Core { parent::__construct($name, $data, $type); $this->set_global("csrf", access::csrf_token()); } - + /** * Override View_Core::render so that we trap errors stemming from bad PHP includes and show a * visible stack trace to help developers. @@ -38,11 +38,6 @@ class View extends View_Core { try { return parent::render($print, $renderer); } catch (Exception $e) { - if (!IN_PRODUCTION) { - print $e->getTraceAsString(); - return $e->getMessage(); - } - Kohana::Log('error', $e->getTraceAsString()); Kohana::Log('debug', $e->getMessage()); return ""; diff --git a/core/views/kohana_error_page.php b/core/views/kohana_error_page.php new file mode 100644 index 00000000..83ad5abb --- /dev/null +++ b/core/views/kohana_error_page.php @@ -0,0 +1,118 @@ + + + + + + + <?= t("Something went wrong!") ?> + + + + admin ?> +
+

+ +

+

+ +

+ +

+ +

+ +
+ +
+

+ +

+ + + + + + + -- cgit v1.2.3