From 3ee9335a0b45801ba85474e3cf65462ba79442c4 Mon Sep 17 00:00:00 2001 From: Jakub Trmota Date: Fri, 28 Nov 2014 17:34:50 +0100 Subject: [PATCH] Debugger: added possibility to set custom error template instead of error.phtml [Closes #85] --- src/Tracy/Debugger.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Tracy/Debugger.php b/src/Tracy/Debugger.php index 1663b5956..430d0276e 100644 --- a/src/Tracy/Debugger.php +++ b/src/Tracy/Debugger.php @@ -92,6 +92,9 @@ class Debugger /** @var string command to open browser (use 'start ""' in Windows) */ public static $browser; + /** @var string custom static error template */ + public static $errorTemplate; + /********************* services ****************d*g**/ /** @var BlueScreen */ @@ -236,7 +239,7 @@ public static function exceptionHandler(\Exception $exception, $exit = TRUE) $error = isset($e) ? "Unable to log error.\n" : NULL; if (self::isHtmlMode()) { - require __DIR__ . '/templates/error.phtml'; + require self::$errorTemplate ?: __DIR__ . '/templates/error.phtml'; } elseif (PHP_SAPI === 'cli') { fwrite(STDERR, "ERROR: application encountered an error and can not continue.\n$error"); }