Esempio n. 1
0
 /**
  * @param CqlException $e
  *
  * @return bool
  */
 private function _isRecoverableException(CqlException $e)
 {
     if ($e->getPrevious() instanceof TTransportException || Strings::startsWith($e->getMessage(), 'TSocketPool: All hosts in pool are down.')) {
         $this->_removeCurrentHost();
         return true;
     }
     if ($e->getPrevious() instanceof InvalidRequestException && Strings::startsWith($e->getMessage(), 'Prepared query with ID')) {
         return true;
     }
     if ($this->_strictRecoverable || $e->getPrevious() instanceof NotFoundException || $e->getPrevious() instanceof InvalidRequestException) {
         return false;
     }
     error_log('Exception As Recoverable: (' . $e->getCode() . ') ' . $e->getMessage());
     return true;
 }