diff options
author | Mark Schaller <mschaller@google.com> | 2015-03-09 21:44:17 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2015-03-10 15:08:15 +0000 |
commit | 730e3178f029c61c6be9f09a96f1ff97519c0a58 (patch) | |
tree | c32fb3f2dad19939370496cc7f6549887c11a6c4 /src/main/java/com/google/devtools/build/lib/skyframe/TargetPatternFunction.java | |
parent | c7a6e3602def43512f8553c86298e1be037594d5 (diff) |
Increase exception specificity in getPackage
The package resolver calls getValueOrThrow in its getPackage method.
This call can throw an exception, and a year ago, the exception could
be multiple different subtypes of NoSuchThingException. Subsequently,
we made it so that only NoSuchPackageException could be thrown, but
the exception type specified in this call site remained the more
general supertype.
--
MOS_MIGRATED_REVID=88154358
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/TargetPatternFunction.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/TargetPatternFunction.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/TargetPatternFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/TargetPatternFunction.java index 6e631ed7e2..b17a2826f6 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/TargetPatternFunction.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/TargetPatternFunction.java @@ -105,7 +105,7 @@ public class TargetPatternFunction implements SkyFunction { Package pkg; try { PackageValue pkgValue = - (PackageValue) env.getValueOrThrow(pkgKey, NoSuchThingException.class); + (PackageValue) env.getValueOrThrow(pkgKey, NoSuchPackageException.class); if (pkgValue == null) { throw new MissingDepException(); } |