@SuppressWarnings("rawtypes")
public static <T extends BTCChinaResponse> T checkResult(T returnObject) {
if (returnObject.getError() != null) {
throw new BTCChinaExchangeException(returnObject.getError());
}
else if (returnObject.getResult() == null) {
throw new ExchangeException("Null data returned");
}
return returnObject;