Allow the exception handler to convert exceptions to hide error messages.

This commit is contained in:
Dylan Thacker-Smith
2015-05-27 18:59:51 -04:00
parent 89c6e605f8
commit 8d5e71f856
4 changed files with 37 additions and 12 deletions
+2 -4
View File
@@ -17,7 +17,7 @@ module Liquid
locale: I18n.new
}
attr_accessor :root, :render_errors
attr_accessor :root
attr_reader :resource_limits
@@file_system = BlankFileSystem.new
@@ -168,7 +168,7 @@ module Liquid
c = args.shift
if @rethrow_errors
c.exception_handler = ->(e) { true }
c.exception_handler = ->(e) { raise }
end
c
@@ -183,8 +183,6 @@ module Liquid
raise ArgumentError, "Expected Hash or Liquid::Context as parameter"
end
context.render_errors = self.render_errors unless self.render_errors.nil?
case args.last
when Hash
options = args.pop