Add exception for SQLite databases that can't be found.
This commit is contained in:
parent
dbc418c0d7
commit
fcdcc656b4
|
@ -41,6 +41,10 @@ public static function connect($config)
|
||||||
{
|
{
|
||||||
return new \PDO('sqlite:'.$config->database, null, null, static::$options);
|
return new \PDO('sqlite:'.$config->database, null, null, static::$options);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new \Exception("SQLite database [".$config->database."] could not be found.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// -----------------------------------------------------
|
// -----------------------------------------------------
|
||||||
// Connect to MySQL or Postgres.
|
// Connect to MySQL or Postgres.
|
||||||
|
|
Loading…
Reference in New Issue