diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2019-01-29 08:05:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-29 08:05:26 +0300 |
commit | c826e18dd078296a97f0ad86167a8d6b15406964 (patch) | |
tree | fd4dcabe63eb076c8638cb101aba5f4cd45fe4a2 /plugins/Monolog | |
parent | 75cf2d2314533cffcaa4333f0566991a4ba15307 (diff) |
Set isHtmlMessage for more exceptions. (#14024)
* Set isHtmlMessage for more exceptions.
* Escaping file names.
Diffstat (limited to 'plugins/Monolog')
-rw-r--r-- | plugins/Monolog/Handler/FileHandler.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/Monolog/Handler/FileHandler.php b/plugins/Monolog/Handler/FileHandler.php index abfd632365..705d455dfd 100644 --- a/plugins/Monolog/Handler/FileHandler.php +++ b/plugins/Monolog/Handler/FileHandler.php @@ -9,6 +9,7 @@ namespace Piwik\Plugins\Monolog\Handler; use Monolog\Handler\StreamHandler; +use Piwik\Exception\MissingFilePermissionException; use Piwik\Filechecks; /** @@ -23,9 +24,11 @@ class FileHandler extends StreamHandler try { parent::write($record); } catch (\UnexpectedValueException $e) { - throw new \Exception( + $ex = new MissingFilePermissionException( Filechecks::getErrorMessageMissingPermissions($this->url) ); + $ex->setIsHtmlMessage(); + throw $ex; } } } |