From de1c23617a2965088d12a6684fcb5a626c85f33c Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 22 Jul 2014 16:02:09 -0700 Subject: [PATCH] config: don't panic on parse error of variables --- config/expr.y | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/expr.y b/config/expr.y index 727e0ef59..27903f714 100644 --- a/config/expr.y +++ b/config/expr.y @@ -83,7 +83,8 @@ variable: var err error $$, err = NewInterpolatedVariable($1) if err != nil { - panic(err) + exprErrors = append(exprErrors, fmt.Errorf( + "Error parsing variable '%s': %s", $1, err)) } }