feat: add better exception message

master
Guillermo Pages 4 years ago
parent efa9d0f2cb
commit 137b586de6

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

Loading…
Cancel
Save