aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main
diff options
context:
space:
mode:
authorGravatar Laurent Le Brun <laurentlb@google.com>2015-03-18 13:34:44 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2015-03-18 13:49:55 +0000
commit4db1e06fb933826c8e652f38a627691389e5b149 (patch)
treec948dd0e43faa987f2e12cf23d492eb53a77ce36 /src/main
parent196c1a7b2db1376fbfaf8f27cdfac4001244756d (diff)
Skylark: Update error message when 'native' module cannot be accessed.
-- MOS_MIGRATED_REVID=88925875
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/google/devtools/build/lib/packages/PackageFactory.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/packages/PackageFactory.java b/src/main/java/com/google/devtools/build/lib/packages/PackageFactory.java
index a641c7c5b1..3e181329e3 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/PackageFactory.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/PackageFactory.java
@@ -824,7 +824,8 @@ public final class PackageFactory {
// if PKG_CONTEXT is missing, we're not called from a BUILD file. This happens if someone
// uses native.some_func() in the wrong place.
throw new EvalException(ast.getLocation(),
- "This function must be wrapped in a macro and called from a BUILD file");
+ "The native module cannot be accessed from here. "
+ + "Wrap the function in a macro and call it from a BUILD file");
}
}