diff options
author | 2016-09-19 15:02:32 +0000 | |
---|---|---|
committer | 2016-09-20 06:45:40 +0000 | |
commit | 72d117d6fe9485b2ab8cf7938c029cc26d1787da (patch) | |
tree | a30a0489c94897d3b1085dc3c147b48d0cd9a4fc /src/main/java/com/google/devtools/build/lib/remote/CacheNotFoundException.java | |
parent | 11fe6abc1703a552701a55241ff6ae8157d81950 (diff) |
Description redacted.
--
MOS_MIGRATED_REVID=133584935
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.java | 23 |
1 files changed, 14 insertions, 9 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 0e4e52c1d4..5820e0bf95 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 @@ -14,20 +14,25 @@ package com.google.devtools.build.lib.remote; +import com.google.devtools.build.lib.remote.RemoteProtocol.ContentDigest; + /** - * An exception to indicate the cache is not found because of an expected - * problem. + * An exception to indicate cache misses. + * TODO(olaola): have a class of checked RemoteCacheExceptions. */ -final class CacheNotFoundException extends RuntimeException { - CacheNotFoundException() { - super(); +public final class CacheNotFoundException extends Exception { + private final ContentDigest missingDigest; + + CacheNotFoundException(ContentDigest missingDigest) { + this.missingDigest = missingDigest; } - CacheNotFoundException(String message) { - super(message); + public ContentDigest getMissingDigest() { + return missingDigest; } - CacheNotFoundException(String message, Throwable cause) { - super(message, cause); + @Override + public String toString() { + return "Missing digest: " + ContentDigests.toString(missingDigest); } } |