diff options
author | 2015-07-08 21:43:31 +0000 | |
---|---|---|
committer | 2015-07-10 17:15:54 +0000 | |
commit | 8990739a4316140972d4e59f53f54853a46cef4e (patch) | |
tree | 76d5df4d67d7cd417aaa8334bc9e96c983549d3f /src/main/java/com/google/devtools/build/lib/runtime | |
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/runtime')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/commands/QueryCommand.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/QueryCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/QueryCommand.java index 72ec9ad8f7..2792a15b66 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/commands/QueryCommand.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/QueryCommand.java @@ -126,7 +126,7 @@ public final class QueryCommand implements BlazeCommand { QueryEvalResult<Target> result; try { result = env.evaluateQuery(expr); - } catch (QueryException e) { + } catch (QueryException | InterruptedException e) { // Keep consistent with reportBuildFileError() runtime.getReporter().handle(Event.error(e.getMessage())); return ExitCode.ANALYSIS_FAILURE; |