diff options
author | Matthieu Napoli <matthieu@mnapoli.fr> | 2014-12-11 04:37:53 +0300 |
---|---|---|
committer | Matthieu Napoli <matthieu@mnapoli.fr> | 2014-12-11 04:37:53 +0300 |
commit | 5c2669513e8561ce2f62aa08c37ef806e43001d7 (patch) | |
tree | e08d0d48e8bd7d5051d2adc6cf0af872da58b5a4 /core/Exception | |
parent | af921f72495a9de907138b5c410ad3f443977c47 (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/Exception')
-rw-r--r-- | core/Exception/ErrorException.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/core/Exception/ErrorException.php b/core/Exception/ErrorException.php new file mode 100644 index 0000000000..1673d8def8 --- /dev/null +++ b/core/Exception/ErrorException.php @@ -0,0 +1,16 @@ +<?php + +namespace Piwik\Exception; + +/** + * ErrorException + * + * @author Matthieu Napoli <matthieu@mnapoli.fr> + */ +class ErrorException extends \ErrorException +{ + public function isHtmlMessage() + { + return true; + } +} |