Rescue any error in validate_interpolation

Fixes #881.

Akinori MUSHA 9 年 前
コミット
c4459308b3
共有1 個のファイルを変更した3 個の追加1 個の削除を含む
  1. 3 1
      app/concerns/liquid_interpolatable.rb

+ 3 - 1
app/concerns/liquid_interpolatable.rb

@@ -15,7 +15,9 @@ module LiquidInterpolatable
15 15
     interpolated
16 16
   rescue Liquid::Error => e
17 17
     errors.add(:options, "has an error with Liquid templating: #{e.message}")
18
-    false
18
+  rescue
19
+    # Calling `interpolated` without an incoming may naturally fail
20
+    # with various errors when an agent expects one.
19 21
   end
20 22
 
21 23
   # Return the current interpolation context.  Use this in your Agent