Package com.evernote.thrift

Examples of com.evernote.thrift.TException


    try {
      for (int bufflen = 0; (bufflen = data.read(buffer)) >= 0;) {
        trans_.write(buffer, 0, bufflen);
      }
    } catch (IOException e) {
      throw new TException("Failed to read from stream", e);
    }
  }
View Full Code Here


    checkReadLength_ = true;
  }

  protected void checkReadLength(int length) throws TException {
    if (length < 0) {
      throw new TException("Negative length: " + length);
    }
    if (checkReadLength_) {
      readLength_ -= length;
      if (readLength_ < 0) {
        throw new TException("Message length exceeded: " + length);
      }
    }
  }
View Full Code Here

   *   recursive depth, to prevent Java stack overflow.
   */
  public static void skip(TProtocol prot, byte type, int maxDepth)
  throws TException {
    if (maxDepth <= 0) {
      throw new TException("Maximum skip depth exceeded");
    }
    switch (type) {
    case TType.BOOL:
      {
        prot.readBool();
View Full Code Here

TOP

Related Classes of com.evernote.thrift.TException

Copyright © 2018 www.massapicom. 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.