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 /core/FrontController.php
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 'core/FrontController.php')
-rw-r--r--core/FrontController.php45
1 files changed, 0 insertions, 45 deletions
diff --git a/core/FrontController.php b/core/FrontController.php
index 7d1702315f..d536ab22a7 100644
--- a/core/FrontController.php
+++ b/core/FrontController.php
@@ -18,7 +18,6 @@ use Piwik\Http\Router;
use Piwik\Plugin\Controller;
use Piwik\Plugin\Report;
use Piwik\Plugin\Widgets;
-use Piwik\Plugins\CoreAdminHome\CustomLogo;
use Piwik\Session;
/**
@@ -610,48 +609,4 @@ class FrontController extends Singleton
Piwik::postEvent('Request.dispatch.end', array(&$result, $module, $action, $parameters));
return $result;
}
-
- /**
- * Returns HTML that displays an exception's error message (and possibly stack trace).
- * The result of this method is echo'd by dispatch.php.
- *
- * @param Exception $ex The exception to use when generating the error page's HTML.
- * @return string The HTML to echo.
- */
- public function getErrorResponse(Exception $ex)
- {
- $debugTrace = $ex->getTraceAsString();
-
- $message = $ex->getMessage();
-
- if (!method_exists($ex, 'isHtmlMessage') || !$ex->isHtmlMessage()) {
- $message = Common::sanitizeInputValue($message);
- }
-
- $logo = new CustomLogo();
-
- $logoHeaderUrl = false;
- $logoFaviconUrl = false;
- try {
- $logoHeaderUrl = $logo->getHeaderLogoUrl();
- $logoFaviconUrl = $logo->getPathUserFavicon();
- } catch (Exception $ex) {
- Log::debug($ex);
- }
-
- $result = Piwik_GetErrorMessagePage($message, $debugTrace, true, true, $logoHeaderUrl, $logoFaviconUrl);
-
- /**
- * Triggered before a Piwik error page is displayed to the user.
- *
- * This event can be used to modify the content of the error page that is displayed when
- * an exception is caught.
- *
- * @param string &$result The HTML of the error page.
- * @param Exception $ex The Exception displayed in the error page.
- */
- Piwik::postEvent('FrontController.modifyErrorPage', array(&$result, $ex));
-
- return $result;
- }
}