mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-06 13:16:39 +02:00
Improve exception message
This exception is commonly thrown in Laravel applications when using Docker. But it is not clear why the system could not open a file that has read permission for all users. So, when I came to the code of Monolog I saw that you try to open it in append mode, so I think that just adding this information could help a lot other users.
This commit is contained in:
committed by
Jordi Boggiano
parent
c3a05db90c
commit
bcca19cee0
@@ -106,7 +106,8 @@ class StreamHandler extends AbstractProcessingHandler
|
||||
restore_error_handler();
|
||||
if (!is_resource($this->stream)) {
|
||||
$this->stream = null;
|
||||
throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened: '.$this->errorMessage, $this->url));
|
||||
|
||||
throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened in append mode: '.$this->errorMessage, $this->url));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user