Add exception for SQLite databases that can't be found.

This commit is contained in:
Taylor Otwell
2011-06-21 13:14:54 -07:00
parent dbc418c0d7
commit fcdcc656b4

View File

@@ -41,6 +41,10 @@ class Connector {
{ {
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.