aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/remote/CacheNotFoundException.java
diff options
context:
space:
mode:
authorGravatar olaola <olaola@google.com>2017-07-27 02:52:37 +0200
committerGravatar Jakob Buchgraber <buchgr@google.com>2017-07-27 09:05:19 +0200
commit1cbba986dbb39051df583be0f1e852ebe84bf583 (patch)
treefc72125ae002d23e0edffa6a341134ec888718b5 /src/main/java/com/google/devtools/build/lib/remote/CacheNotFoundException.java
parent64c36e1a02a664c604fcff59bd55a0073e38a422 (diff)
Fixing #3380: output stack traces and informative messages.
Also added tests specifically for the output, to ensure we don't break it again. TESTED=remote worker, unit tests RELNOTES: fixes #3380 PiperOrigin-RevId: 163283558
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/remote/CacheNotFoundException.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/remote/CacheNotFoundException.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/remote/CacheNotFoundException.java b/src/main/java/com/google/devtools/build/lib/remote/CacheNotFoundException.java
index cffc58fd4b..15ff3ef3ad 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/CacheNotFoundException.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/CacheNotFoundException.java
@@ -15,24 +15,21 @@
package com.google.devtools.build.lib.remote;
import com.google.devtools.remoteexecution.v1test.Digest;
+import java.io.IOException;
/**
* An exception to indicate cache misses.
* TODO(olaola): have a class of checked RemoteCacheExceptions.
*/
-public final class CacheNotFoundException extends Exception {
+public final class CacheNotFoundException extends IOException {
private final Digest missingDigest;
CacheNotFoundException(Digest missingDigest) {
+ super("Missing digest: " + missingDigest);
this.missingDigest = missingDigest;
}
public Digest getMissingDigest() {
return missingDigest;
}
-
- @Override
- public String toString() {
- return "Missing digest: " + missingDigest;
- }
}