Examples of RetrievalException


Examples of com.socialnetworkshirts.twittershirts.dataaccess.twitter.exceptions.RetrievalException

                XMLReader parser = XMLReaderFactory.createXMLReader();
                parser.setContentHandler(handler);
                parser.parse(source);
                return new FollowersResult(handler.getUsers(), handler.getNextCursor());
            } else
                throw new RetrievalException("Could not fetch followers data for " +
                        twitterName + "! Status code was " + statusCode + "!");

        } catch (Exception e) {
            throw new RetrievalException("Could not fetch followers data for " +
                    twitterName + "!", e);
        }
    }
View Full Code Here

Examples of com.socialnetworkshirts.twittershirts.dataaccess.twitter.exceptions.RetrievalException

                TwitterUserXMLProcessingHandler handler = new TwitterUserXMLProcessingHandler();
                XMLReader parser = XMLReaderFactory.createXMLReader();
                parser.setContentHandler(handler);
                parser.parse(source);
                if (handler.getUsers().size() == 0)
                    throw new RetrievalException("Could not retrieve data for user " + twitterName + "!");
                return handler.getUsers().get(0);
            } else
                throw new RetrievalException("Could not fetch user data for " +
                        twitterName + "! Status code was " + statusCode + "!");

        } catch (Exception e) {
            throw new RetrievalException("Could not fetch user data for " +
                    twitterName + "!", e);
        }
    }
View Full Code Here

Examples of com.socialnetworkshirts.twittershirts.dataaccess.twitter.exceptions.RetrievalException

            XMLReader parser = XMLReaderFactory.createXMLReader();
            parser.setContentHandler(handler);
            parser.parse(source);
            return handler.getUsers();
        } catch (Exception e) {
            throw new RetrievalException("Could not fetch followers data for " +
                    twitterName + "!", e);
        }
    }
View Full Code Here

Examples of com.socialnetworkshirts.twittershirts.dataaccess.twitter.exceptions.RetrievalException

            XMLReader parser = XMLReaderFactory.createXMLReader();
            parser.setContentHandler(handler);
            parser.parse(source);
            return handler.getUsers().get(0);
        } catch (Exception e) {
            throw new RetrievalException("Could not fetch user data for " +
                    twitterName + "!", e);
        }
    }
View Full Code Here

Examples of dijjer.io.comm.RetrievalException

          } catch (InterruptedException e) {
          }
        }
      }
      if (_prb.isAborted()) {
        throw new RetrievalException(_prb.getAbortReason(), _prb.getAbortDescription());
      }
      _os.write(_prb.getPacket(currentPacket).getData());
      currentPacket++;
    }
  }
View Full Code Here

Examples of dijjer.io.comm.RetrievalException

        }
        continue;
      }
      if ((m1 != null) && m1.getSpec().equals(DMT.sendAborted)) {
        _prb.abort(m1.getInt(DMT.REASON), m1.getString(DMT.DESCRIPTION));
        throw new RetrievalException(m1.getInt(DMT.REASON), m1.getString(DMT.DESCRIPTION));
      }
      if ((m1 == null) || (m1.getSpec().equals(DMT.allSent))) {
        if (consecutiveMissingPacketReports >= MAX_CONSECUTIVE_MISSING_PACKET_REPORTS) {
          _prb.abort(RetrievalException.SENDER_DIED, "Sender unresponsive to resend requests");
          LinkedList rem = new LinkedList();
          rem.add(_sender);
          // TODO: This is a stupid work around for BlockTransferTest and needs to be fixed
          if (RoutingTable.getRoutingTable() != null)
          RoutingTable.getRoutingTable().removePeers(rem, "Failed to send data after acking request");
          throw new RetrievalException(RetrievalException.SENDER_DIED,
              "Sender unresponsive to resend requests");
        }
        LinkedList missing = new LinkedList();
        for (int x = 0; x < _prb.getNumPackets(); x++) {
          if (!_prb.isReceived(x)) {
View Full Code Here

Examples of edu.smu.tspell.wordnet.impl.file.RetrievalException

          SynsetFactory factory = SynsetFactory.getInstance();
          synset = factory.getSynset(indexEntry.getSynsetPointer());
        }
        else
        {
          throw new RetrievalException("Unable to locate head word " +
              "entry for " + headKey + " referenced by " + this);
        }
      }
    }
    return (AdjectiveSynset)(synset);
View Full Code Here

Examples of freenet.io.comm.RetrievalException

      try {
        sendAborted(_prb._abortReason, _prb._abortDescription);
      } catch (NotConnectedException e) {
        // Ignore at this point.
      }
      callback.blockReceiveFailed(new RetrievalException(reason, description));
    } else {
      Logger.error(this, "Succeeded in complete("+reason+","+description+") on "+this, new Exception("error"));
      callback.blockReceived(block);
    }
    decRunningBlockReceives();
View Full Code Here

Examples of freenet.io.comm.RetrievalException

          callback.blockReceived(_prb.getBlock());
          return;
        } catch (AbortedException e1) {
          e = e1;
        }
        callback.blockReceiveFailed(new RetrievalException(_prb._abortReason, _prb._abortDescription));
        return;
      }
    }
    incRunningBlockReceives();
    try {
      waitNotification(false);
    } catch (DisconnectedException e) {
      RetrievalException retrievalException = new RetrievalException(RetrievalException.SENDER_DISCONNECTED);
      _prb.abort(retrievalException.getReason(), retrievalException.toString(), true /* kind of, it shouldn't count towards the stats anyway */);
      callback.blockReceiveFailed(retrievalException);
      decRunningBlockReceives();
    } catch(RuntimeException e) {
      decRunningBlockReceives();
      throw e;
View Full Code Here

Examples of ivory.core.RetrievalException

        }

        try {
          metafeatureValues.put(mf, readDataStats(file));
        } catch (IOException e) {
          throw new RetrievalException("Error: " + e);
        }

        float defaultValue = XMLTools.getAttributeValue(child, "default", 0.0f);
        defaultValues.put(mf.getName(), defaultValue);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.