Sha256: 29cff91327ea13319ead8790518607ecc9523cb9a4f1e53248a17512a35a9e79

Contents?: true

Size: 798 Bytes

Versions: 4

Compression:

Stored size: 798 Bytes

Contents

require_relative 'module'

module Snapshot
  class ErrorHandler
    class << self
      # @param [Array] The output of the errored build (line by line)
      # This method should raise an exception in any case, as the return code indicated a failed build
      def handle_test_error(output, return_code)
        # The order of the handling below is import

        if return_code == 65
          UI.user_error!("Tests failed - check out the log above")
        end

        case output
        when /com\.apple\.CoreSimulator\.SimError/
          UI.important "The simulator failed to launch - retrying..."
        when /is not configured for Running/
          UI.user_error!("Scheme is not properly configured, make sure to check out the snapshot README")
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fastlane-2.74.1 snapshot/lib/snapshot/error_handler.rb
fastlane-2.74.0 snapshot/lib/snapshot/error_handler.rb
fastlane-2.74.0.beta.20180108010004 snapshot/lib/snapshot/error_handler.rb
fastlane-2.74.0.beta.20180107010004 snapshot/lib/snapshot/error_handler.rb