now passing pry instance as 3rd parameter to exception_handler proc
This commit is contained in:
parent
1779ee499d
commit
90d88d3492
|
@ -51,7 +51,7 @@ class Pry
|
|||
end
|
||||
|
||||
# Will only show the first line of the backtrace
|
||||
DEFAULT_EXCEPTION_HANDLER = proc do |output, exception|
|
||||
DEFAULT_EXCEPTION_HANDLER = proc do |output, exception, _|
|
||||
output.puts "#{exception.class}: #{exception.message}"
|
||||
output.puts "from #{exception.backtrace.first}"
|
||||
end
|
||||
|
|
|
@ -254,7 +254,7 @@ class Pry
|
|||
# Output the result or pass to an exception handler (if result is an exception).
|
||||
def show_result(result)
|
||||
if last_result_is_exception?
|
||||
exception_handler.call output, result
|
||||
exception_handler.call output, result, self
|
||||
else
|
||||
print.call output, result
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue