From 39f33a8742950b0ac5de8fa2ed2d7a608bc2ac2d Mon Sep 17 00:00:00 2001 From: zYne Date: Wed, 25 Jul 2007 12:42:56 +0000 Subject: [PATCH] --- manual/new/docs/en/exceptions-and-warnings.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/manual/new/docs/en/exceptions-and-warnings.txt b/manual/new/docs/en/exceptions-and-warnings.txt index 3aca6c358..2ee9ad38e 100644 --- a/manual/new/docs/en/exceptions-and-warnings.txt +++ b/manual/new/docs/en/exceptions-and-warnings.txt @@ -12,17 +12,18 @@ try { ++ Relation exceptions -thrown if something failed during the relation parsing +Relation exceptions are being thrown if something failed during the relation parsing. ++ Connection exceptions -thrown if something failed at the database level +Connection exceptions are being thrown if something failed at the database level. Doctrine offers fully portable database error handling. This means that whether you are using sqlite or some other database you can always get portable error code and message for the occurred error. try { $conn->execute('SELECT * FROM unknowntable'); -} catch (Doctrine_Connection_Exception) { - // catch errors +} catch (Doctrine_Connection_Exception $e) { + print 'Code : ' . $e->getPortableCode(); + print 'Message : ' . $e->getPortableMessage(); }