From: Arran Cudbard-Bell Date: Mon, 25 Oct 2021 18:18:01 +0000 (-0400) Subject: More verbose assert on type mismatch X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ffc3a684ee57c20da616f4dba34985108903fce;p=thirdparty%2Ffreeradius-server.git More verbose assert on type mismatch --- diff --git a/src/lib/server/cond_tokenize.c b/src/lib/server/cond_tokenize.c index 8e4448b0637..c648b1a812c 100644 --- a/src/lib/server/cond_tokenize.c +++ b/src/lib/server/cond_tokenize.c @@ -226,7 +226,10 @@ static int cond_cast_tmpl(tmpl_t *vpt, fr_type_t *p_type, tmpl_t *other) * Which means we no longer need the cast. */ fr_assert(tmpl_is_data(vpt)); - fr_assert(fr_type_is_null(vpt->cast) || (vpt->cast == tmpl_value_type(vpt))); + fr_assert_msg(fr_type_is_null(vpt->cast) || (vpt->cast == tmpl_value_type(vpt)), + "Cast mismatch, target was %s, but output was %s", + fr_table_str_by_value(fr_value_box_type_table, vpt->cast, ""), + fr_table_str_by_value(fr_value_box_type_table, tmpl_value_type(vpt), "")); (void) tmpl_cast_set(vpt, FR_TYPE_NULL); return 0; }