EcomDev / EcomDev_UrlRewrite

Alternative implementation of Url Rewrite Index by EcomDev
72 stars 33 forks source link

Transaction rollbacks #15

Open phizab opened 10 years ago

phizab commented 10 years ago

Is there a reason why there are no rollbacks in the module? At every transaction is only a commit, but as I know we need a rollback in case of an error. The commit should be wrapped with a try .. catch statement as follows:

$this->_getIndexAdapter()->beginTransaction();

[..]

try {
    $this->_getIndexAdapter()->commit();
} catch (Exception $e) {
    $this->_getIndexAdapter()->rollback();
}

Or am I wrong?