private static <T> T safeRun(Evaluater<T> runnable) throws PermanentFailure, RetryableFailure {
try {
return runnable.run();
} catch (DatastoreTimeoutException e) {
throw new RetryableFailure(e);
} catch (ConcurrentModificationException e) {
throw new RetryableFailure(e);
} catch (DatastoreFailureException e) {
throw new PermanentFailure(e);
} catch (DatastoreNeedIndexException e) {
throw new PermanentFailure(e);
} catch (PreparedQuery.TooManyResultsException e) {