From 7178caf4a947cf48f3785b2b1b6ec658a2ce146a Mon Sep 17 00:00:00 2001 From: Christopher Joe Date: Mon, 12 Jun 2017 10:08:12 +1200 Subject: [PATCH] Enhancement show the path which threw the error --- src/Core/Manifest/Module.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Core/Manifest/Module.php b/src/Core/Manifest/Module.php index d806f85cb..564984ab3 100644 --- a/src/Core/Manifest/Module.php +++ b/src/Core/Manifest/Module.php @@ -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; }