Skip to content

Commit 801d058

Browse files
committed
[DX] Show the ParseException message in YAML file loaders
1 parent d10ff55 commit 801d058

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Loader/YamlFileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ protected function loadFile($file)
660660
try {
661661
$configuration = $this->yamlParser->parseFile($file, Yaml::PARSE_CONSTANT | Yaml::PARSE_CUSTOM_TAGS);
662662
} catch (ParseException $e) {
663-
throw new InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML: '.$e->getMessage(), $file), 0, $e);
663+
throw new InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML', $file).': '.$e->getMessage(), 0, $e);
664664
} finally {
665665
restore_error_handler();
666666
}

0 commit comments

Comments
 (0)