Commit afe1479b authored by Geoff Simmons's avatar Geoff Simmons

fix error messages from set methods

parent fca1f559
...@@ -123,7 +123,7 @@ client c1 { ...@@ -123,7 +123,7 @@ client c1 {
expect resp.http.empty_anchored2 == <undef> expect resp.http.empty_anchored2 == <undef>
} -run } -run
varnish v1 -errvcl {vmod re2 error: unanchored.add("("): missing ): (} { varnish v1 -errvcl {vmod re2 error: unanchored.add("("): Cannot compile '(': missing ): (} {
import re2 from "${vmod_topbuild}/src/.libs/libvmod_re2.so"; import re2 from "${vmod_topbuild}/src/.libs/libvmod_re2.so";
backend b { .host = "${bad_ip}"; } backend b { .host = "${bad_ip}"; }
...@@ -136,7 +136,7 @@ varnish v1 -errvcl {vmod re2 error: unanchored.add("("): missing ): (} { ...@@ -136,7 +136,7 @@ varnish v1 -errvcl {vmod re2 error: unanchored.add("("): missing ): (} {
} }
} }
varnish v1 -errvcl {vmod re2 error: anchored.add("("): missing ): (} { varnish v1 -errvcl {vmod re2 error: anchored.add("("): Cannot compile '(': missing ): (} {
import re2 from "${vmod_topbuild}/src/.libs/libvmod_re2.so"; import re2 from "${vmod_topbuild}/src/.libs/libvmod_re2.so";
backend b { .host = "${bad_ip}"; } backend b { .host = "${bad_ip}"; }
......
...@@ -446,14 +446,15 @@ vmod_set_add(VRT_CTX, struct vmod_re2_set *set, VCL_STRING pattern) ...@@ -446,14 +446,15 @@ vmod_set_add(VRT_CTX, struct vmod_re2_set *set, VCL_STRING pattern)
/* XXX: check if compiled */ /* XXX: check if compiled */
if ((err = vre2set_add(set->set, pattern)) != NULL) { if ((err = vre2set_add(set->set, pattern)) != NULL) {
VERR(ctx, ERR_PREFIX "%s", set->vcl_name, pattern, err); VERR(ctx, ERR_PREFIX "Cannot compile '%s': %s", set->vcl_name,
pattern, pattern, err);
return; return;
} }
} }
#undef ERR_PREFIX #undef ERR_PREFIX
#define ERR_PREFIX "%s.compile(\"%s\"): " #define ERR_PREFIX "%s.compile(): "
VCL_VOID VCL_VOID
vmod_set_compile(VRT_CTX, struct vmod_re2_set *set) vmod_set_compile(VRT_CTX, struct vmod_re2_set *set)
......
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