Examples of TException


Examples of com.facebook.thrift.TException

  public void writeListBegin(TList list) throws TException {
    if(list.elemType == TType.STRUCT ||
       list.elemType == TType.MAP ||
       list.elemType == TType.LIST ||
       list.elemType == TType.SET) {
      throw new TException("Not implemented: nested structures");
    }
    firstInnerField = true;
    inner = true;
  }
View Full Code Here

Examples of com.facebook.thrift.TException

  public void writeSetBegin(TSet set) throws TException {
    if(set.elemType == TType.STRUCT ||
       set.elemType == TType.MAP ||
       set.elemType == TType.LIST ||
       set.elemType == TType.SET) {
      throw new TException("Not implemented: nested structures");
    }
    firstInnerField = true;
    inner = true;
  }
View Full Code Here

Examples of com.facebook.thrift.TException

    }
    internalWriteString(str);
  }

  public void writeBinary(byte[] bin) throws TException {
    throw new TException("Ctl separated protocol cannot support writing Binary data!");
  }
View Full Code Here

Examples of com.facebook.thrift.TException

    else
      return ret;
  }

  public byte[] readBinary() throws TException {
    throw new TException("Not implemented for control separated data");
  }
View Full Code Here

Examples of com.facebook.thrift.TException

      sortOrder = "";
    }
    for(int i=0; i<sortOrder.length(); i++) {
      char c = sortOrder.charAt(i);
      if (c != '+' && c != '-') {
        throw new TException(Constants.SERIALIZATION_SORT_ORDER + " should be a string consists of only '+' and '-'!");
      }
    }
    LOG.info("Sort order is \"" + sortOrder + "\"");
  }
View Full Code Here

Examples of com.facebook.thrift.TException

  public void writeString(String str) throws TException {
    byte[] dat;
    try {
      dat = str.getBytes("UTF-8");
    } catch (UnsupportedEncodingException uex) {
      throw new TException("JVM DOES NOT SUPPORT UTF-8: " + uex.getMessage());
    }
    writeRawBytes(nonNullByte, 0, 1);
    int begin = 0;
    int i = 0;
    for (; i < dat.length; i++) {
View Full Code Here

Examples of com.facebook.thrift.TException

    }
    try {
      String r = new String(stringBytes, 0, i, "UTF-8");
      return r;
    } catch (UnsupportedEncodingException uex) {
      throw new TException("JVM DOES NOT SUPPORT UTF-8: " + uex.getMessage());
    }
  }
View Full Code Here

Examples of com.pugh.sockso.templates.api.TException

            processActions( getApiActions() );
        }
       
        catch ( final BadRequestException e ) {
           
            TException tpl = new TException();
            tpl.setMessage( e.getMessage() );
           
            getResponse().setStatus( e.getStatusCode() );
            getResponse().showJson( tpl.makeRenderer() );
           
        }
       
    }
View Full Code Here

Examples of org.apache.blur.thirdparty.thrift_0_9_0.TException

  public void writeString(String str) throws TException {
    try {
      byte[] bytes = str.getBytes("UTF-8");
      writeBinary(bytes, 0, bytes.length);
    } catch (UnsupportedEncodingException e) {
      throw new TException("UTF-8 not supported!");
    }
  }
View Full Code Here

Examples of org.apache.blur.thirdparty.thrift_0_9_0.TException

        return str;
      } else {
        return new String(readBinary(length), "UTF-8");
      }
    } catch (UnsupportedEncodingException e) {
      throw new TException("UTF-8 not supported!");
    }
  }
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.