diff options
author | 2016-01-25 09:04:54 +0000 | |
---|---|---|
committer | 2016-01-25 16:51:02 +0000 | |
commit | 9668361ba9db4b3d2b05e5e33e2c82a7f1085f2b (patch) | |
tree | 35647fde32e60ff6fca5eefb5cd21cbe60f2ee05 /src/main/java/com | |
parent | f9bb0abc56c656a30698c41524f362eb04b60bed (diff) |
Use the existing exception instance, not a new one.
Note that this can never happen in production - the loading phase ensures that
we only attempt to analyze targets that load successfully. That's also why
there are no tests for this.
This code path will become live in a later change, with corresponding test
coverage; the existing tests cover this in principle, we just need to make
them run with the reduced loading phase.
--
MOS_MIGRATED_REVID=112926211
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java index 0532d72990..97b6d36c75 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java @@ -155,9 +155,8 @@ final class ConfiguredTargetFunction implements SkyFunction { Target target; try { target = packageValue.getPackage().getTarget(lc.getLabel().getName()); - } catch (NoSuchTargetException e1) { - throw new ConfiguredTargetFunctionException(new NoSuchTargetException(lc.getLabel(), - "No such target")); + } catch (NoSuchTargetException e) { + throw new ConfiguredTargetFunctionException(e); } transitivePackages.add(packageValue.getPackage()); // TODO(bazel-team): This is problematic - we create the right key, but then end up with a value |