Skip to content

Commit a2b80cd

Browse files
committed
[DX] Show the ParseException message in YAML file loaders
1 parent 53b432f commit a2b80cd

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
@@ -66,7 +66,7 @@ public function load($file, $type = null)
6666
try {
6767
$parsedConfig = $this->yamlParser->parseFile($path);
6868
} catch (ParseException $e) {
69-
throw new \InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML.', $path), 0, $e);
69+
throw new \InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML', $path).': '.$e->getMessage(), 0, $e);
7070
} finally {
7171
restore_error_handler();
7272
}

0 commit comments

Comments
 (0)