Page 1 of 1

How to use AdoDB_Exception?

Posted: Mon Sep 22, 2008 2:00 pm
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