Advertisement
Guest User

Untitled

a guest
Jul 27th, 2010
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. class db{
  2.     //...
  3.     /**
  4.      * @throws dbException
  5.      */
  6.     public function rollback($throwException = false){
  7.         try{
  8.             if ($this->isTransactionActive()){
  9.                     $this->dbh->rollBack();
  10.             }
  11.         } catch (Exception $e) {//перестраховка
  12.             if($throwException){
  13.                 throw new dbException('rollback fail', 0, $e);
  14.             }
  15.             exceptionHandlerClass::exceptionLog($e);//статическая зависимость
  16.         }
  17.     }
  18.     //...
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement