@Test public void testSetTaskInfoErrorStage() throws Throwable { TaskState state = new TaskState(); ServiceUtils.setTaskInfoErrorStage(state, new RuntimeException("foo")); assertThat(state.stage, is(TaskState.TaskStage.FAILED)); assertThat(state.failure.message, containsString("foo")); }
public static void setTaskInfoErrorStage(TaskState state, Throwable e) { state.stage = TaskState.TaskStage.FAILED; state.failure = Utils.toServiceErrorResponse(e); }
ServiceUtils { public static void setTaskInfoErrorStage(TaskState state, Throwable e) { state.stage = TaskState.TaskStage.FAILED; state.failure = Utils.toServiceErrorResponse(e); } }
ServiceUtils { public static void setTaskInfoErrorStage(TaskState state, Throwable e) { state.stage = TaskState.TaskStage.FAILED; state.failure = Utils.toServiceErrorResponse(e); }  }
ServiceUtils { public static void setTaskInfoErrorStage(TaskState state, Throwable e) { state.stage = TaskState.TaskStage.FAILED; state.failure = Utils.toServiceErrorResponse(e); }  static void setTaskInfoErrorStage(TaskState state, Throwable e); static void logInfo(Service service, String fmt, Object... args); static void logSevere(Service service, String fmt, Object... args); static void logSevere(Service service, Throwable e); static void logSevere(Service service, Collection<Throwable> errors); static void logTrace(Service service, String fmt, Object... args); static void logTrace(Service service, Throwable e); static void logWarning(Service service, String fmt, Object... args); static T selectRandomItem(Set<T> items); static long computeExpirationTime(long durationMicros); static String getIDFromDocumentSelfLink(String documentSelfLink); static void setExpandedIndexing(ServiceDocument sd, String... fieldNames); static void setSortedIndexing(ServiceDocument sd, String... fieldNames); static void setIndexingOptions(ServiceDocument sd,
                                        ServiceDocumentDescription.PropertyIndexingOption option,
                                        String... fieldNames); static boolean documentEquals(
      Class<T> type, T document1, T document2); static URI createUriFromServerSet(ServerSet serverSet, String path); static URI createUriFromServerSet(ServerSet serverSet, String path, String protocol); static URI createUriFromServerSet(Set<InetSocketAddress> serverInetSet, String path); static URI createUriFromServerSet(Set<InetSocketAddress> serverInetSet, String path, String protocol); static URI selectLocalServer(ServerSet serverSet, String path); static void failOperationAsBadRequest(Service service, Operation operation, Throwable e); static void failOperationAsBadRequest(Service service,
                                               Operation operation,
                                               Throwable e,
                                               Object failureBody); static Operation doServiceOperation(Service service, Operation requestedOperation); static void expireDocumentOnDelete(
      Service service,
      Class<T> serviceDocumentType,
      Operation deleteOperation); }
ServiceUtils { public static void setTaskInfoErrorStage(TaskState state, Throwable e) { state.stage = TaskState.TaskStage.FAILED; state.failure = Utils.toServiceErrorResponse(e); }  static void setTaskInfoErrorStage(TaskState state, Throwable e); static void logInfo(Service service, String fmt, Object... args); static void logSevere(Service service, String fmt, Object... args); static void logSevere(Service service, Throwable e); static void logSevere(Service service, Collection<Throwable> errors); static void logTrace(Service service, String fmt, Object... args); static void logTrace(Service service, Throwable e); static void logWarning(Service service, String fmt, Object... args); static T selectRandomItem(Set<T> items); static long computeExpirationTime(long durationMicros); static String getIDFromDocumentSelfLink(String documentSelfLink); static void setExpandedIndexing(ServiceDocument sd, String... fieldNames); static void setSortedIndexing(ServiceDocument sd, String... fieldNames); static void setIndexingOptions(ServiceDocument sd,
                                        ServiceDocumentDescription.PropertyIndexingOption option,
                                        String... fieldNames); static boolean documentEquals(
      Class<T> type, T document1, T document2); static URI createUriFromServerSet(ServerSet serverSet, String path); static URI createUriFromServerSet(ServerSet serverSet, String path, String protocol); static URI createUriFromServerSet(Set<InetSocketAddress> serverInetSet, String path); static URI createUriFromServerSet(Set<InetSocketAddress> serverInetSet, String path, String protocol); static URI selectLocalServer(ServerSet serverSet, String path); static void failOperationAsBadRequest(Service service, Operation operation, Throwable e); static void failOperationAsBadRequest(Service service,
                                               Operation operation,
                                               Throwable e,
                                               Object failureBody); static Operation doServiceOperation(Service service, Operation requestedOperation); static void expireDocumentOnDelete(
      Service service,
      Class<T> serviceDocumentType,
      Operation deleteOperation); static final long DEFAULT_DOC_EXPIRATION_TIME_MICROS; static final long DEFAULT_ON_DELETE_DOC_EXPIRATION_TIME_MICROS; }