php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42933 pg_query warning doesn't catches
Submitted: 2007-10-11 18:10 UTC Modified: 2007-10-11 18:22 UTC
From: f dot fenix at gmail dot com Assigned:
Status: Not a bug Package: PostgreSQL related
PHP Version: 5.2.4 OS: FreeBSD 6.2
Private report: No CVE-ID: None
 [2007-10-11 18:10 UTC] f dot fenix at gmail dot com
Description:
------------
If in PostgreSQL stored function I make raise exception, when I call it by pg_query, I have PHP WARNING. But try-catch block doesn't work. 


Reproduce code:
---------------
try
{
  $this->resultID = pg_query($this->connectID, $this->query);
}
catch (Exception $e)
{
  $this->dieDB($e);
}

Expected result:
----------------
Catched exception in var $e

Actual result:
--------------
Warning:  pg_query(): Query failed: ERROR:  PASSWORD_WRONG#users# in /xxx/dbi.class.php on line 175.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-11 18:22 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

PostgreSQL extension does not use Exceptions.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 09 17:01:32 2024 UTC