From 9686884c6216aaf8c4f11ec1274db70f42eec4cb Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Tue, 30 May 2023 11:25:00 -0700 Subject: [PATCH] panic for undefined variables --- renrs/src/parser/event.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renrs/src/parser/event.rs b/renrs/src/parser/event.rs index 53abb11..b2344d9 100644 --- a/renrs/src/parser/event.rs +++ b/renrs/src/parser/event.rs @@ -34,7 +34,7 @@ fn interpolate_string(input: &str, variables: &HashMap) -> String if let Some(value) = variables.get(var_name) { value.to_string() } else { - format!("[{}]", var_name) + panic!("undefined variable `{var_name}`"); } });