diff options
author | Matthieu Napoli <matthieu@mnapoli.fr> | 2014-12-11 04:37:53 +0300 |
---|---|---|
committer | Matthieu Napoli <matthieu@mnapoli.fr> | 2014-12-11 04:37:53 +0300 |
commit | 5c2669513e8561ce2f62aa08c37ef806e43001d7 (patch) | |
tree | e08d0d48e8bd7d5051d2adc6cf0af872da58b5a4 /console | |
parent | af921f72495a9de907138b5c410ad3f443977c47 (diff) |
#6622 Logger refactoring: Separated error and exception handling from logging
- the error handler logs warnings and notices, and turns errors into exceptions (`ErrorException`)
- the exception handler catches all uncatched exceptions and display them to the user (HTML or CLI)
- the "screen" logging backend has been removed
- I've normalized exceptions/errors shown to the user in HTML (wether they are catched by the FrontController or not)
Diffstat (limited to 'console')
-rwxr-xr-x | console | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -25,5 +25,12 @@ if (!Piwik\Common::isPhpCliMode()) { exit; } +if (!defined('PIWIK_ENABLE_ERROR_HANDLER') || PIWIK_ENABLE_ERROR_HANDLER) { + require_once PIWIK_INCLUDE_PATH . '/core/Error.php'; + \Piwik\Error::setErrorHandler(); + require_once PIWIK_INCLUDE_PATH . '/core/ExceptionHandler.php'; + \Piwik\ExceptionHandler::setUp(); +} + $console = new Piwik\Console(); $console->run();
\ No newline at end of file |