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:
Diffstat (limited to 'index.php')
-rw-r--r--index.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/index.php b/index.php
index b99afaed76..504159c037 100644
--- a/index.php
+++ b/index.php
@@ -55,7 +55,18 @@ if(!defined('PIWIK_ENABLE_ERROR_HANDLER') || PIWIK_ENABLE_ERROR_HANDLER)
if(!defined('PIWIK_ENABLE_DISPATCH') || PIWIK_ENABLE_DISPATCH)
{
- $controller = Piwik_FrontController::getInstance();
- $controller->init();
- $controller->dispatch();
+ try {
+ $controller = Piwik_FrontController::getInstance();
+ $controller->init();
+ $controller->dispatch();
+ } catch (Exception $e) {
+ if(!defined('PIWIK_ENABLE_ERROR_HANDLER') || PIWIK_ENABLE_ERROR_HANDLER)
+ {
+ throw $e;
+ }
+ else
+ {
+ error_log($e->getMessage(), 0);
+ }
+ }
}