mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-17 01:40:42 -07:00
Allow the exception handler to convert exceptions to hide error messages.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user