feat: add better exception message
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user