Rescue any error in validate_interpolation

Fixes #881.

Akinori MUSHA 9 anni fa
parent
commit
c4459308b3
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  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