From: Raphaël Barrois Date: Fri, 5 Apr 2013 21:22:54 +0000 (+0200) Subject: Add an extension hook for error reporting. X-Git-Tag: core/1.1.10~1 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=f3f26e2b84a4ddd6c1daf3013bfa8adc252b727a;p=platal.git Add an extension hook for error reporting. Signed-off-by: Raphaël Barrois --- 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) . '
');