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:
Dylan Thacker-Smith
2016-12-12 10:29:09 -05:00
committed by GitHub
parent fae3a2de7b
commit 869dbc7ebf
3 changed files with 21 additions and 3 deletions
+5
View File
@@ -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