How to use AdoDB_Exception?

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
Sonya

How to use AdoDB_Exception?

Post by Sonya »

Hello,

how can I catch MySQL errors? If I use the construction below:

Code: Select all

try {
    $dbresult = $db->Execute($query);
} catch (exception $e) {
    var_dump($e);
} 
nothing happens even if query could not be executed and fails. I've read about Error Handlers for Adodb http://adodblite.sourceforge.net/errorhandler.php but I do not know where this line have to be added. I tryed to extend adodb.functions.php just after

Code: Select all

		$adodb_light = cms_join_path(dirname(__FILE__),'adodb_lite','adodb.inc.php');
but it seems to be ignored. No errors are catched.

Thank you,
Sonya
Post Reply

Return to “Developers Discussion”