瀏覽代碼

[Yaml][Parser] changes according review

Maksim Kotlyar 13 年之前
父節點
當前提交
7961014140
共有 1 個文件被更改,包括 1 次插入4 次删除
  1. 1 4
      src/Symfony/Component/Yaml/Yaml.php

+ 1 - 4
src/Symfony/Component/Yaml/Yaml.php

@@ -49,10 +49,7 @@ class Yaml
         // if input is a file, process it
         if (strpos($input, "\n") === false && is_file($input)) {
             if (false === is_readable($input)) {
-                throw new \InvalidArgumentException(sprintf(
-                    'The service file "%s" is not readable.',
-                    $input
-                ));
+                throw new ParseException(sprintf('Unable to parse "%s" as the file is not readable.', $input));
             }
 
             $file = $input;