Class: LiquidDebug::ErrorHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/liquid_debug/error_handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(error, stack, output = LiquidDebug.output) ⇒ ErrorHandler

Returns a new instance of ErrorHandler.



5
6
7
8
9
# File 'lib/liquid_debug/error_handler.rb', line 5

def initialize(error, stack, output = LiquidDebug.output)
  @error = error
  @stack = stack
  @output = output
end

Instance Method Details

#backtrace(limit = 10) ⇒ Object



15
16
17
# File 'lib/liquid_debug/error_handler.rb', line 15

def backtrace(limit = 10)
  @backtrace ||= trace(limit)
end


11
12
13
# File 'lib/liquid_debug/error_handler.rb', line 11

def print(limit = 10)
  report(limit)
end