mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-16 17:30:43 -07:00
feature: Allow a default exception renderer to be specified (#837)
This could be used to preserve the old default of rendering non-Liquid::Error messages or for providing default behaviour like error reporting which could be missed if the exception renderer needed to be specified on each render.
This commit is contained in:
committed by
GitHub
parent
fae3a2de7b
commit
869dbc7ebf
@@ -69,6 +69,11 @@ module Liquid
|
||||
# :error raises an error when tainted output is used
|
||||
attr_writer :taint_mode
|
||||
|
||||
attr_accessor :default_exception_renderer
|
||||
Template.default_exception_renderer = lambda do |exception|
|
||||
exception
|
||||
end
|
||||
|
||||
def file_system
|
||||
@@file_system
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user