note 103004 added to sqlite3.construct

From: Date: Sat, 19 Mar 2011 14:47:51 +0000
Subject: note 103004 added to sqlite3.construct
Groups: php.notes 
Request: Send a blank email to php-notes+get-178005@lists.php.net to get a copy of this message
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. ---- Server IP: 69.147.83.197 Probable Submitter: 85.180.9.69 ---- Manual Page -- http://www.php.net/manual/en/sqlite3.construct.php Edit -- https://master.php.net/note/edit/103004 Del: integrated -- https://master.php.net/note/delete/103004/integrated Del: useless -- https://master.php.net/note/delete/103004/useless Del: bad code -- https://master.php.net/note/delete/103004/bad+code Del: spam -- https://master.php.net/note/delete/103004/spam Del: non-english -- https://master.php.net/note/delete/103004/non-english Del: in docs -- https://master.php.net/note/delete/103004/in+docs Del: other reasons-- https://master.php.net/note/delete/103004 Reject -- https://master.php.net/note/reject/103004 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#178005) next »