mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
commit
950b1dfec2
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user