diff options
author | 2015-06-09 22:09:03 +0000 | |
---|---|---|
committer | 2015-06-10 16:02:26 +0000 | |
commit | 331633c7c22a9ae00f26e11fb6c54a9bd2b83097 (patch) | |
tree | 69a0ae31a464a35b49ab149ff60bd26ef2f90627 /src/main/java/com/google/devtools/build/lib/actions/PackageRootResolutionException.java | |
parent | 1cad714e2157dd940cc75428e8bb4d682b1bef28 (diff) |
Handle exceptions encountered resolving packages during the execution phase
Currently we may do lookups of not-already-cached packages during the
execution phase for actions that discover inputs. Exceptions encountered
during this would go unhandled and result in a crash. Here we introduce
PackageRootResolutionException which wraps these exceptions and triggers
an ActionExecutionException which is cleanly handled in the exec phase.
As part of this change SkyframeActionExecutor#getArtifactRoots(...) will
fail properly on errors getting package roots.
--
MOS_MIGRATED_REVID=95578891
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions/PackageRootResolutionException.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/actions/PackageRootResolutionException.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/PackageRootResolutionException.java b/src/main/java/com/google/devtools/build/lib/actions/PackageRootResolutionException.java new file mode 100644 index 0000000000..ff16aaa789 --- /dev/null +++ b/src/main/java/com/google/devtools/build/lib/actions/PackageRootResolutionException.java @@ -0,0 +1,26 @@ +// Copyright 2015 Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.google.devtools.build.lib.actions; + +/** + * Exception signaling an error occurred determining package roots. See + * {@link PackageRootResolver#findPackageRoots(Iterable)} for further details. + */ +public class PackageRootResolutionException extends Exception { + + public PackageRootResolutionException(String msg, Throwable cause) { + super(msg, cause); + } +} |