From: Arran Cudbard-Bell Date: Mon, 19 Feb 2024 19:35:31 +0000 (-0600) Subject: Make the assert much more explicit X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1adfe5a1013528749f586e03fc0b02c276fa1d4d;p=thirdparty%2Ffreeradius-server.git Make the assert much more explicit --- diff --git a/src/lib/unlang/xlat_inst.c b/src/lib/unlang/xlat_inst.c index ee016f658c5..b069abcea97 100644 --- a/src/lib/unlang/xlat_inst.c +++ b/src/lib/unlang/xlat_inst.c @@ -656,7 +656,9 @@ static inline CC_HINT(always_inline) int xlat_instance_register(xlat_exp_head_t * If thread instantiate has been called, it's too late to * bootstrap new xlats. */ - fr_assert(!xlat_thread_inst_tree); + fr_assert_msg(!xlat_thread_inst_tree, "Tried to instantiate new compile time xlat at runtime. " + "xlat.runtime_el likely not set in tmpl rules when it should've been. " + "Use unlang_interpret_event_list() to get the current event list from the request"); /* * Initialise the instance tree if this is the first xlat