feat: add better exception message

This commit is contained in:
Guillermo Pages
2022-07-01 11:20:12 +02:00
parent aeec3e36d1
commit 858a85954d
2 changed files with 7 additions and 7 deletions

View File

@@ -5,7 +5,7 @@ class DotEnv {
public static function loadFromFile($filepath) {
if (!file_exists($filepath)) {
throw new \Exception('Cannot find file');
throw new \Exception("Cannot find file: $filepath");
}
$contents = file_get_contents($filepath);
$lines = explode(PHP_EOL, $contents);