@Test public void testPlainTextException() { DatastoreException exception = RemoteRpc.makeException("url", METHOD_NAME, new ByteArrayInputStream("Text Error".getBytes()), "text/plain", Charsets.UTF_8, new RuntimeException(), 401); assertEquals(Code.INTERNAL, exception.getCode()); assertEquals( "Non-protobuf error: Text Error. HTTP status code was 401.", exception.getMessage()); assertEquals(METHOD_NAME, exception.getMethodName()); }
public static DatastoreException makeException(String url, String methodName, Code code, String message, Throwable cause) { logger.fine("remote datastore call " + methodName + " against " + url + " failed: " + message); return new DatastoreException(methodName, code, message, cause); }
RemoteRpc { public static DatastoreException makeException(String url, String methodName, Code code, String message, Throwable cause) { logger.fine("remote datastore call " + methodName + " against " + url + " failed: " + message); return new DatastoreException(methodName, code, message, cause); } }
RemoteRpc { public static DatastoreException makeException(String url, String methodName, Code code, String message, Throwable cause) { logger.fine("remote datastore call " + methodName + " against " + url + " failed: " + message); return new DatastoreException(methodName, code, message, cause); } RemoteRpc(HttpRequestFactory client, HttpRequestInitializer initializer, String url); }
RemoteRpc { public static DatastoreException makeException(String url, String methodName, Code code, String message, Throwable cause) { logger.fine("remote datastore call " + methodName + " against " + url + " failed: " + message); return new DatastoreException(methodName, code, message, cause); } RemoteRpc(HttpRequestFactory client, HttpRequestInitializer initializer, String url); InputStream call(String methodName, MessageLite request); String getUrl(); static DatastoreException makeException(String url, String methodName, Code code,
      String message, Throwable cause); }
RemoteRpc { public static DatastoreException makeException(String url, String methodName, Code code, String message, Throwable cause) { logger.fine("remote datastore call " + methodName + " against " + url + " failed: " + message); return new DatastoreException(methodName, code, message, cause); } RemoteRpc(HttpRequestFactory client, HttpRequestInitializer initializer, String url); InputStream call(String methodName, MessageLite request); String getUrl(); static DatastoreException makeException(String url, String methodName, Code code,
      String message, Throwable cause);  }