Module: Test::Unit::ErrorHandler
| Relationships & Source Files | |
| Extension / Inclusion / Inheritance Descendants | |
| Included In: | |
| Defined in: | lib/test/unit/error.rb | 
Constant Summary
- 
    NOT_PASS_THROUGH_EXCEPTIONS =
    
 # File 'lib/test/unit/error.rb', line 79[] 
- 
    NOT_PASS_THROUGH_EXCEPTION_NAMES =
    
 # File 'lib/test/unit/error.rb', line 80["Timeout::Error"]
- 
    PASS_THROUGH_EXCEPTIONS =
    
 # File 'lib/test/unit/error.rb', line 81[ NoMemoryError, SignalException, Interrupt, SystemExit, ] 
- 
    PASS_THROUGH_EXCEPTION_NAMES =
    
 # File 'lib/test/unit/error.rb', line 87[] 
Class Method Summary
Instance Method Summary
- #add_error(exception) private
- #handle_all_exception(exception) private
- #pass_through_exception?(exception) ⇒ Boolean private
Class Method Details
.included(base)
[ GitHub ]# File 'lib/test/unit/error.rb', line 74
def included(base) base.exception_handler(:handle_all_exception) end
Instance Method Details
#add_error(exception) (private)
[ GitHub ]#handle_all_exception(exception) (private)
[ GitHub ]# File 'lib/test/unit/error.rb', line 89
def handle_all_exception(exception) return false if pass_through_exception?(exception) problem_occurred add_error(exception) true end
    #pass_through_exception?(exception)  ⇒ Boolean  (private)
  
# File 'lib/test/unit/error.rb', line 97
def pass_through_exception?(exception) case exception when *NOT_PASS_THROUGH_EXCEPTIONS return false end case exception.class.name when *NOT_PASS_THROUGH_EXCEPTION_NAMES return false end case exception when *PASS_THROUGH_EXCEPTIONS return true end case exception.class.name when *PASS_THROUGH_EXCEPTION_NAMES return true end false end