note 103004 rejected from sqlite3.construct by thiago

From: Date: Mon, 21 Mar 2011 14:11:10 +0000
Subject: note 103004 rejected from sqlite3.construct by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-178050@lists.php.net to get a copy of this message
Note Submitter: bernhard001 at gmx dot de ---- As this is not mentioned in the documentation: Nothing is returned if opening the database was not successful. An exception will be thrown: <?php try { $db = new SQLite3('not_existing_path/test.db'); } catch (Exception $e) { echo $e->getMessage(); } ?> Unable to open database: unable to open database file The function SQLite3::open() seems to have the same behavior. It does not return false as documented, if opening was not successful. Instead, an exception is thrown.

« previous php.notes (#178050) next »