Class: Snapshot::ErrorHandler
- Inherits:
-
Object
- Object
- Snapshot::ErrorHandler
- Defined in:
- lib/snapshot/error_handler.rb
Overview
This classes methods are called when something goes wrong in the building process
Defined Under Namespace
Classes: TestsFailedException
Class Method Summary collapse
-
.handle_test_error(output, return_code) ⇒ Object
This method should raise an exception in any case, as the return code indicated a failed build.
Class Method Details
.handle_test_error(output, return_code) ⇒ Object
This method should raise an exception in any case, as the return code indicated a failed build
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/snapshot/error_handler.rb', line 10 def handle_test_error(output, return_code) # The order of the handling below is import if return_code == 65 raise TestsFailedException.new, "Tests failed - check out the log above".red end case output when /com\.apple\.CoreSimulator\.SimError/ print "The simulator failed to launch - retrying..." end end |