Adding additional logging that would have been useful when debugging issue #152.
--
Change-Id: I9968c3da2210b630502b47b7ed96acd71c7d7349
MOS_MIGRATED_REVID=92749744
diff --git a/src/main/java/com/google/devtools/build/lib/actions/Artifact.java b/src/main/java/com/google/devtools/build/lib/actions/Artifact.java
index 4eb11ca..c39c228 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/Artifact.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/Artifact.java
@@ -139,10 +139,12 @@
@VisibleForTesting
public Artifact(Path path, Root root, PathFragment execPath, ArtifactOwner owner) {
if (root == null || !path.startsWith(root.getPath())) {
- throw new IllegalArgumentException(root + ": illegal root for " + path);
+ throw new IllegalArgumentException(root + ": illegal root for " + path
+ + " (execPath: " + execPath + ")");
}
if (execPath == null || execPath.isAbsolute() || !path.asFragment().endsWith(execPath)) {
- throw new IllegalArgumentException(execPath + ": illegal execPath for " + path);
+ throw new IllegalArgumentException(execPath + ": illegal execPath for " + path
+ + " (root: " + root + ")");
}
this.path = path;
this.root = root;