Ejemplo n.º 1
0
 /**
  * Handle a DBQueryError which occurred during a write operation.
  */
 protected function handleWriteError(DBError $exception)
 {
     if ($exception instanceof DBConnectionError) {
         $this->connFailureTime = time();
         $this->connFailureError = $exception;
     }
     if ($this->db && $this->db->wasReadOnlyError()) {
         try {
             $this->db->rollback(__METHOD__);
         } catch (DBError $e) {
         }
     }
     wfDebugLog('SQLBagOStuff', "DBError: {$exception->getMessage()}");
     if ($this->db) {
         wfDebug(__METHOD__ . ": ignoring query error\n");
     } else {
         wfDebug(__METHOD__ . ": ignoring connection error\n");
     }
 }