Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Napoli <matthieu@mnapoli.fr>2014-12-11 04:37:53 +0300
committerMatthieu Napoli <matthieu@mnapoli.fr>2014-12-11 04:37:53 +0300
commit5c2669513e8561ce2f62aa08c37ef806e43001d7 (patch)
treee08d0d48e8bd7d5051d2adc6cf0af872da58b5a4 /console
parentaf921f72495a9de907138b5c410ad3f443977c47 (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-xconsole7
1 files changed, 7 insertions, 0 deletions
diff --git a/console b/console
index e3738ab10a..1b4d7c7e08 100755
--- a/console
+++ b/console
@@ -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