Module: Pry::ExceptionHandler Private
- Defined in:
- lib/pry/exception_handler.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
-
.handle_exception(output, exception, _pry_instance) ⇒ Object
private
Will only show the first line of the backtrace.
Class Method Details
.handle_exception(output, exception, _pry_instance) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Will only show the first line of the backtrace.
9 10 11 12 13 14 15 |
# File 'lib/pry/exception_handler.rb', line 9 def handle_exception(output, exception, _pry_instance) if exception.is_a?(UserError) && exception.is_a?(SyntaxError) output.puts "SyntaxError: #{exception..sub(/.*syntax error, */m, '')}" else output.puts standard_error_text_for(exception) end end |