From f3f26e2b84a4ddd6c1daf3013bfa8adc252b727a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Fri, 5 Apr 2013 23:22:54 +0200 Subject: [PATCH] Add an extension hook for error reporting. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Barrois --- classes/platal.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/classes/platal.php b/classes/platal.php index 7e4476d..d15c99f 100644 --- a/classes/platal.php +++ b/classes/platal.php @@ -487,6 +487,11 @@ abstract class Platal */ abstract public function force_login(PlPage $page); + protected function report_error($error) + { + PlErrorReport::report($error); + } + public function run() { $page =& self::page(); @@ -516,7 +521,7 @@ abstract class Platal } } catch (Exception $e) { header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error'); - PlErrorReport::report($e); + $this->report_error($e); if (self::globals()->debug) { $page->kill(pl_entities($e->getMessage()) . '
' . pl_entities("" . $e) . '
'); -- 2.1.4