You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
private Callable<ExecutionResult<T, R>> newCallable(final Task<T, R> task) {
return new IdentifiableCallable<T, ExecutionResult<T,R>>() {
@Override
public ExecutionResult<T, R> call() throws Exception {
R r = null;
ExecutionResult<T, R> result = null;
try {
task.markStart();
executionListener.onStart(task);
r = task.execute(); // throw a Error
result = ExecutionResult.success(task.getId(), r);
state.removeErrored(result);
task.markEnd();
executionListener.onSuccess(task);
} catch (Exception e) { //cannot catch Error
result = ExecutionResult.errored(task.getId(), r, e.getMessage());
state.addErrored(result);
task.markEnd();
executionListener.onError(task, e);
logger.error("Error Execution Task # {}", task.getId(), e);
} finally {
// result is NULL
result.setTimes(task.getStartTime(), task.getEndTime());
}
return result;
}
@Override
public T getIdentifier() {
return task.getId();
}
};
}
The text was updated successfully, but these errors were encountered:
hnkfwhw
changed the title
DefaultEngine will throw a NPE when a task thows a Error
DefaultEngine will throw a NPE when a task throws a Error
Nov 4, 2023
The text was updated successfully, but these errors were encountered: