aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/repository
diff options
context:
space:
mode:
authorGravatar dmarting <dmarting@google.com>2017-09-04 15:30:57 +0200
committerGravatar Yun Peng <pcloudy@google.com>2017-09-04 18:24:35 +0200
commit0145f79d70ee7fea9c3bea5291bf8b8e2fa90533 (patch)
tree08587a7ed45b8573e94d7d1c76be69e4985bf758 /src/main/java/com/google/devtools/build/lib/rules/repository
parente0b40c2ed911b7a29a29335388f7e62927e12901 (diff)
Throws an ISE when a handler is not defined
The only case this exception is thrown is when there is a bug in Bazel and we should surface the whole stacktrace. See #3664 PiperOrigin-RevId: 167492638
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/repository')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java b/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java
index c64c44c647..a14800870d 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java
@@ -129,9 +129,8 @@ public final class RepositoryDelegatorFunction implements SkyFunction {
handler = handlers.get(rule.getRuleClass());
}
if (handler == null) {
- throw new RepositoryFunctionException(
- new EvalException(rule.getLocation(), "Could not find handler for " + rule),
- Transience.PERSISTENT);
+ throw new IllegalStateException(
+ new EvalException(rule.getLocation(), "Could not find handler for " + rule));
}
handler.setClientEnvironment(clientEnvironment);