Module: ApiHammer::ShowTextExceptions::AllExceptionsExceptOnesWeMustNotRescue
- Defined in:
- lib/api_hammer/show_text_exceptions.rb
Overview
this module blatantly stolen from https://github.com/rspec/rspec-support/blob/v3.5.0/lib/rspec/support.rb#L121-L130 under MIT license https://github.com/rspec/rspec-support/blob/v3.5.0/LICENSE.md
Constant Summary collapse
- AVOID_RESCUING =
These exceptions are dangerous to rescue as rescuing them would interfere with things we should not interfere with.
[NoMemoryError, SignalException, Interrupt, SystemExit]
Class Method Summary collapse
Class Method Details
.===(exception) ⇒ Object
20 21 22 |
# File 'lib/api_hammer/show_text_exceptions.rb', line 20 def self.===(exception) AVOID_RESCUING.none? { |ar| ar === exception } end |