[master] 63fb2ec Polish an error message
Poul-Henning Kamp
phk at FreeBSD.org
Wed Jan 31 10:50:10 UTC 2018
commit 63fb2ecb5231b7123153a379d292722ee99ea3fb
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Jan 31 07:51:01 2018 +0000
Polish an error message
diff --git a/lib/libvcc/vcc_action.c b/lib/libvcc/vcc_action.c
index 3724cdc..9c77516 100644
--- a/lib/libvcc/vcc_action.c
+++ b/lib/libvcc/vcc_action.c
@@ -135,6 +135,7 @@ parse_set(struct vcc *tl)
} else {
vcc_Expr(tl, fmt);
}
+ ERRCHK(tl);
tl->indent -= INDENT;
Fb(tl, 1, ");\n");
SkipToken(tl, ';');
diff --git a/lib/libvcc/vcc_expr.c b/lib/libvcc/vcc_expr.c
index 2cf80e0..e4d2d20 100644
--- a/lib/libvcc/vcc_expr.c
+++ b/lib/libvcc/vcc_expr.c
@@ -692,6 +692,10 @@ vcc_expr4(struct vcc *tl, struct expr **e, vcc_type_t fmt)
"Symbol type (%s) can not be used in expression.\n",
VCC_SymKind(tl, sym));
vcc_ErrWhere(tl, tl->t);
+ if (sym->def_b != NULL) {
+ VSB_printf(tl->sb, "That symbol was defined here:\n");
+ vcc_ErrWhere(tl, sym->def_b);
+ }
return;
case CSTR:
assert(fmt != VOID);
More information about the varnish-commit
mailing list