Skip to content

Commit

Permalink
Debugger: added possibility to set custom error template instead of e…
Browse files Browse the repository at this point in the history
…rror.phtml [Closes #85]
  • Loading branch information
forrest79 authored and dg committed Dec 1, 2014
1 parent 40ce578 commit 3ee9335
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Tracy/Debugger.php
Expand Up @@ -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 */
Expand Down Expand Up @@ -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");
}
Expand Down

0 comments on commit 3ee9335

Please sign in to comment.