Exception: StandardError
- Inherits:
-
Exception
- Object
- Exception
- StandardError
- Defined in:
- lib/jekyll_plugin_support/jekyll_plugin_support_class.rb
Overview
Monkey patch StandardError so a new method called shorten_backtrace is added.
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#shorten_backtrace(backtrace_element_count = 3) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/jekyll_plugin_support/jekyll_plugin_support_class.rb', line 5 def shorten_backtrace(backtrace_element_count = 3) # self.backtrace = backtrace[0..backtrace_element_count].map do |x| # raise JekyllPluginSupportError, "backtrace contains a #{x.class} with value '#{x}'." unless x.instance_of? String # x.gsub(Dir.pwd + '/', './') # end end |