From: Christian Weiske Date: Wed, 11 Apr 2012 18:29:38 +0000 (+0200) Subject: show exception stack traces when debugging is on X-Git-Tag: v0.1.0~46 X-Git-Url: https://git.cweiske.de/phorkie.git/commitdiff_plain/1dbeb12332ae24ea782b557636fff0cc59805f12?ds=sidebyside show exception stack traces when debugging is on --- diff --git a/data/config.default.php b/data/config.default.php index cec3799..804ff5e 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -1,5 +1,6 @@ false, 'gitdir' => __DIR__ . '/../repos/git/', 'workdir' => __DIR__ . '/../repos/work/', 'tpl' => __DIR__ . '/templates/', diff --git a/data/templates/exception.htm b/data/templates/exception.htm index 99fddb9..dc07fc5 100644 --- a/data/templates/exception.htm +++ b/data/templates/exception.htm @@ -10,6 +10,9 @@

{{exception.getMessage}}

+ {% if debug %} +
{{exception.getTraceAsString}}
+ {% endif %} diff --git a/www/www-header.php b/www/www-header.php index 77ee758..0a3b562 100644 --- a/www/www-header.php +++ b/www/www-header.php @@ -21,7 +21,13 @@ set_exception_handler( } else { header('HTTP/1.0 500 Internal server error'); } - render('exception', array('exception' => $e)); + render( + 'exception', + array( + 'exception' => $e, + 'debug' => $GLOBALS['phorkie']['cfg']['debug'] + ) + ); exit(); } );