瀏覽代碼

Merge pull request #31 from weaverryan/stream_exception_language

Trying to carefully improve the language on a common exception message
Jordi Boggiano 14 年之前
父節點
當前提交
5b88a7a67c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Monolog/Handler/StreamHandler.php

+ 1 - 1
src/Monolog/Handler/StreamHandler.php

@@ -64,7 +64,7 @@ class StreamHandler extends AbstractProcessingHandler
             $this->stream = @fopen($this->url, 'a');
             if (!is_resource($this->stream)) {
                 $this->stream = null;
-                throw new \UnexpectedValueException('The stream could not be opened, "'.$this->url.'" may be an invalid url.');
+                throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened; it may be invalid or not writable.', $this->url));
             }
         }
         fwrite($this->stream, (string) $record['message']);