summaryrefslogtreecommitdiff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-06-14 11:57:08 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-06-14 11:57:08 +0000
commite6f14352d61721db83b46e0e56c4d19b731fed95 (patch)
tree7bf7741f5c63b956dde1bfbbdc2da8d587ce2a7d /Src/exec.c
parent4af11dc57a6f3d1c8f0ed412f6f11cf835edcf4e (diff)
downloadzsh-e6f14352d61721db83b46e0e56c4d19b731fed95.tar.gz
zsh-e6f14352d61721db83b46e0e56c4d19b731fed95.zip
28037: improved error messages for module autoloads
of math functions and builtins
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 8fd52420b..6611e9c79 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -2274,18 +2274,20 @@ static HashNode
resolvebuiltin(const char *cmdarg, HashNode hn)
{
if (!((Builtin) hn)->handlerfunc) {
+ char *modname = dupstring(((Builtin) hn)->optstr);
/*
* Ensure the module is loaded and the
* feature corresponding to the builtin
* is enabled.
*/
- (void)ensurefeature(((Builtin) hn)->optstr, "b:",
+ (void)ensurefeature(modname, "b:",
(hn->flags & BINF_AUTOALL) ? NULL :
hn->nam);
hn = builtintab->getnode(builtintab, cmdarg);
if (!hn) {
lastval = 1;
- zerr("unknown builtin: %s", cmdarg);
+ zerr("autoloading module %s failed to define builtin: %s",
+ modname, cmdarg);
return NULL;
}
}