|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-01-31 19:22 UTC] cellog@php.net
Description:
------------
SQLite3->__construct does not indicate errors by anything other than an E_NOTICE. This means we have to set a user error handler just to tell whether or not this code succeeds:
<?php
$a = new SQLite3('/path/to/database.sqlite');
?>
the constructor should throw an exception, or provide an error string parameter by reference like the SQLite object.
Reproduce code:
---------------
<?php
// run as non-root
$a = new SQLite3('/root/database.sqlite');
?>
Expected result:
----------------
exception
Actual result:
--------------
E_NOTICE error
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 26 20:00:01 2025 UTC |
I'll add an error mode option and probably default it to an exception. I'm not a huge fan of heavy exception throwing code, you end up wrapping huge blocks of code in try {}.