aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/DirectoryListingStateFunction.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/DirectoryListingStateFunction.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/DirectoryListingStateFunction.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/DirectoryListingStateFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/DirectoryListingStateFunction.java
index 307c74b22a..aa1fe760e2 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/DirectoryListingStateFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/DirectoryListingStateFunction.java
@@ -45,10 +45,8 @@ public class DirectoryListingStateFunction implements SkyFunction {
return null;
}
return DirectoryListingStateValue.create(dirRootedPath);
- } catch (ExternalFilesHelper.NonexistentImmutableExternalFileException e) {
- // DirectoryListingStateValue.key assumes the path exists. This exception here is therefore
- // indicative of a programming bug.
- throw new IllegalStateException(dirRootedPath.toString(), e);
+ } catch (FileOutsidePackageRootsException e) {
+ throw new DirectoryListingStateFunctionException(e);
} catch (IOException e) {
throw new DirectoryListingStateFunctionException(e);
}
@@ -68,5 +66,9 @@ public class DirectoryListingStateFunction implements SkyFunction {
public DirectoryListingStateFunctionException(IOException e) {
super(e, Transience.TRANSIENT);
}
+
+ public DirectoryListingStateFunctionException(FileOutsidePackageRootsException e) {
+ super(e, Transience.PERSISTENT);
+ }
}
}