mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
now passing pry instance as 3rd parameter to exception_handler proc
This commit is contained in:
parent
1779ee499d
commit
90d88d3492
2 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue