diff options
author | Janak Ramakrishnan <janakr@google.com> | 2015-07-08 21:43:31 +0000 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@google.com> | 2015-07-10 17:15:54 +0000 |
commit | 8990739a4316140972d4e59f53f54853a46cef4e (patch) | |
tree | 76d5df4d67d7cd417aaa8334bc9e96c983549d3f /src/main/java/com/google/devtools/build/lib/query2/engine/QueryExpression.java | |
parent | c7d2c54d7a78d4515d4788e31c5474b8089ec37c (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/QueryExpression.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/query2/engine/QueryExpression.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/query2/engine/QueryExpression.java b/src/main/java/com/google/devtools/build/lib/query2/engine/QueryExpression.java index 23603f16ff..3e71aac64a 100644 --- a/src/main/java/com/google/devtools/build/lib/query2/engine/QueryExpression.java +++ b/src/main/java/com/google/devtools/build/lib/query2/engine/QueryExpression.java @@ -67,7 +67,8 @@ public abstract class QueryExpression { * thrown. If disabled, evaluation will stumble on to produce a (possibly * inaccurate) result, but a result nonetheless. */ - public abstract <T> Set<T> eval(QueryEnvironment<T> env) throws QueryException; + public abstract <T> Set<T> eval(QueryEnvironment<T> env) + throws QueryException, InterruptedException; /** * Collects all target patterns that are referenced anywhere within this query expression and adds |