Commit e2de855f authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add a specific error message to explain <action> -> return(<action>)

syntax change



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4626 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent aeff495a
......@@ -511,6 +511,17 @@ parse_synthetic(struct tokenlist *tl)
/*--------------------------------------------------------------------*/
static void
parse_new_syntax(struct tokenlist *tl)
{
vsb_printf(tl->sb, "Please change \"%.*s\" to \"return(%.*s)\".\n",
PF(tl->t), PF(tl->t));
vcc_ErrWhere(tl, tl->t);
}
/*--------------------------------------------------------------------*/
typedef void action_f(struct tokenlist *tl);
static struct action_table {
......@@ -520,6 +531,11 @@ static struct action_table {
{ "restart", parse_restart },
{ "error", parse_error },
#define VCL_RET_MAC(l, U) \
{ #l, parse_new_syntax },
#include "vcl_returns.h"
#undef VCL_RET_MAC
/* Keep list sorted from here */
{ "call", parse_call },
{ "esi", parse_esi },
......
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