aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/query2/engine/LetExpression.java
diff options
context:
space:
mode:
authorGravatar Janak Ramakrishnan <janakr@google.com>2015-07-08 21:43:31 +0000
committerGravatar Han-Wen Nienhuys <hanwen@google.com>2015-07-10 17:15:54 +0000
commit8990739a4316140972d4e59f53f54853a46cef4e (patch)
tree76d5df4d67d7cd417aaa8334bc9e96c983549d3f /src/main/java/com/google/devtools/build/lib/query2/engine/LetExpression.java
parentc7d2c54d7a78d4515d4788e31c5474b8089ec37c (diff)
Throw InterruptedException directly if a query is interrupted, instead of wrapping it in a QueryException.
QueryException should usually indicate a persistent failure, while an InterruptedException is transient. Wrapping the InterruptedException in a QueryException just obfuscates state. -- MOS_MIGRATED_REVID=97815388
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/query2/engine/LetExpression.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/query2/engine/LetExpression.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/query2/engine/LetExpression.java b/src/main/java/com/google/devtools/build/lib/query2/engine/LetExpression.java
index 3e17ccebbe..cc4ec5c5bb 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/engine/LetExpression.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/engine/LetExpression.java
@@ -52,7 +52,7 @@ class LetExpression extends QueryExpression {
}
@Override
- public <T> Set<T> eval(QueryEnvironment<T> env) throws QueryException {
+ public <T> Set<T> eval(QueryEnvironment<T> env) throws QueryException, InterruptedException {
if (!NAME_PATTERN.matcher(varName).matches()) {
throw new QueryException(this, "invalid variable name '" + varName + "' in let expression");
}