Enhancement show the path which threw the error

This commit is contained in:
Christopher Joe 2017-06-12 10:08:12 +12:00
parent 4733abd79f
commit 7178caf4a9

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;
}