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(); }