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:
authordiosmosis <benaka@piwik.pro>2014-10-28 06:09:00 +0300
committerdiosmosis <benaka@piwik.pro>2014-10-28 06:46:32 +0300
commitcdb7ed2bb9a8ed11d5e59c00a2b89951f8d71eb8 (patch)
treea04a6fb288a43b79020a73a0e533c4d19db02892 /core/FrontController.php
parent5ac9a8983f6438b67bf924fc1f1ac00890a54923 (diff)
Adding event so the error page contents can be modified.
Diffstat (limited to 'core/FrontController.php')
-rw-r--r--core/FrontController.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/core/FrontController.php b/core/FrontController.php
index 164cb34e74..cdf79aeace 100644
--- a/core/FrontController.php
+++ b/core/FrontController.php
@@ -617,7 +617,20 @@ class FrontController extends Singleton
$message = Common::sanitizeInputValue($ex->getMessage());
}
- return Piwik_GetErrorMessagePage($message, $debugTrace, true, true);
+ $result = Piwik_GetErrorMessagePage($message, $debugTrace, true, true);
+
+ /**
+ * 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;
}
}