mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Enhancement show the path which threw the error
This commit is contained in:
parent
4733abd79f
commit
7178caf4a9
@ -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