diff options
author | diosmosis <benaka@piwik.pro> | 2014-10-28 06:09:00 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2014-10-28 06:46:32 +0300 |
commit | cdb7ed2bb9a8ed11d5e59c00a2b89951f8d71eb8 (patch) | |
tree | a04a6fb288a43b79020a73a0e533c4d19db02892 /core/FrontController.php | |
parent | 5ac9a8983f6438b67bf924fc1f1ac00890a54923 (diff) |
Adding event so the error page contents can be modified.
Diffstat (limited to 'core/FrontController.php')
-rw-r--r-- | core/FrontController.php | 15 |
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; } } |