Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.11.5

Bug #4383 Generator expects error but doesn't call expectError()
Submitted: 2005-05-18 20:25 UTC
From: justinpatrin Assigned: alan_k
Status: Closed Package: DB_DataObject
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    

 [2005-05-18 20:25 UTC] justinpatrin
Description: ------------ I noticed that the generator was throwing an error if I set: PEAR::setErrorHandling(PEAR_ERROR_DIE); or PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'errFunc'); However, if no error handling is set the generator works fine. This is due to this call in _createTableList(): $this->tables = $__DB->getListOf('schema.tables'); This is assumed to fail as the next call checks for an error. Because this error is expected, this shouldn't be caught by the normal error handler. To fix this, use expectError. Here's the altered code: $__DB->expectError(DB_ERROR_UNSUPPORTED); $this->tables = $__DB->getListOf('schema.tables'); $__DB->popExpect();


 [2005-06-04 01:54 UTC] alan_k
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on In case this was a website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.