Merge pull request #7010 from flamerohr/pulls/4.0/no-path-to-follow

Enhancement show the path which threw the error
This commit is contained in:
Chris Joe 2017-06-12 10:36:46 +12:00 committed by GitHub
commit 950b1dfec2

View File

@ -143,7 +143,8 @@ class Module implements Serializable
$content = file_get_contents($path);
$result = json_decode($content, true);
if (json_last_error()) {
throw new Exception(json_last_error_msg());
$errorMessage = json_last_error_msg();
throw new Exception("$path: $errorMessage");
}
$this->composerData = $result;
}