/** * Rollback changes in a transaction. * @return void */ public function rollback() { if (!$this->inTxn) { throw new DibiException('There is no active transaction.'); } $this->driver->rollback(); $this->inTxn = FALSE; dibi::notify($this, 'rollback'); }
/** * Construct an dibi driver exception. * * @param string Message describing the exception * @param int Some code * @param string SQL command */ public function __construct($message = NULL, $code = 0, $sql = NULL) { parent::__construct($message, (int) $code); $this->sql = $sql; dibi::notify(NULL, 'exception', $this); }