class RSpec::Core::Example
def set_exception(exception, context=nil)
- Private: -
def set_exception(exception, context=nil) if @exception && context != :dont_print # An error has already been set; we don't want to override it, # but we also don't want silence the error, so let's print it. msg = <<-EOS or occurred #{context} ception.class}: #{exception.message} rred at #{exception.backtrace.first} EOS RSpec.configuration.reporter.message(msg) end @exception ||= exception end