Fix Job.Result logging.
This commit is contained in:
parent
1c4833f3b4
commit
19b2658414
1 changed files with 17 additions and 0 deletions
|
@ -175,6 +175,23 @@ public abstract class Job {
|
||||||
return runtimeException;
|
return runtimeException;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @NonNull String toString() {
|
||||||
|
switch (resultType) {
|
||||||
|
case SUCCESS:
|
||||||
|
case RETRY:
|
||||||
|
return resultType.toString();
|
||||||
|
case FAILURE:
|
||||||
|
if (runtimeException == null) {
|
||||||
|
return resultType.toString();
|
||||||
|
} else {
|
||||||
|
return "FATAL_FAILURE";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return "UNKNOWN?";
|
||||||
|
}
|
||||||
|
|
||||||
private enum ResultType {
|
private enum ResultType {
|
||||||
SUCCESS, FAILURE, RETRY
|
SUCCESS, FAILURE, RETRY
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue