Commit 12fa6302 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Improve an error message now that the risk of hitting a wrong type

of symbol is much larger.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@5388 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 4c18f314
......@@ -546,6 +546,10 @@ vcc_expr4(struct vcc *tl, struct expr **e, enum var_type fmt)
vcc_NextToken(tl);
break;
}
/*
* XXX: what if var and func/proc had same name ?
* XXX: look for SYM_VAR first for consistency ?
*/
sym = VCC_FindSymbol(tl, tl->t, SYM_NONE);
if (sym == NULL) {
vsb_printf(tl->sb, "Symbol not found: ");
......@@ -579,7 +583,9 @@ vcc_expr4(struct vcc *tl, struct expr **e, enum var_type fmt)
vcc_ErrWhere(tl, tl->t);
return;
default:
vsb_printf(tl->sb, "Symbol is not a function.\n");
vsb_printf(tl->sb,
"Symbol type (%s) wrong in expression.\n",
VCC_SymKind(tl, sym));
vcc_ErrWhere(tl, tl->t);
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment