Sha256: 65807436ce3cdc50602f4da68c8c67e8b38b799e86d0d19ad7c66eb1d79ef86b

Contents?: true

Size: 696 Bytes

Versions: 14

Compression:

Stored size: 696 Bytes

Contents

module Kaya
  module Support
    class ErrorHandlerHelper

      def self.evaluate exception
        case exception
          when Mongo::ConnectionTimeoutError
            ["Timeout Error","Could not connect to database"]
          when Psych::SyntaxError
            ["Parse Error","Cucumber.yml file is not configured correctly (#{exception.message})"]
          when Kaya::Error::Suite
            ["Suite Name Error",exception.message]
          when Kaya::Error::CucumberYML
            ["No Cucumber file", exception.message]
          else
            message = "#{exception.message}#{exception.backtrace}"
            ["Unknown Error", message]
        end
      end
    end
  end
end


Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
kaya-0.0.14 lib/kaya/support/error_handler_helper.rb
kaya-0.0.13 lib/kaya/support/error_handler_helper.rb
kaya-0.0.12 lib/kaya/support/error_handler_helper.rb
kaya-0.0.11 lib/kaya/support/error_handler_helper.rb
kaya-0.0.10 lib/kaya/support/error_handler_helper.rb
kaya-0.0.9 lib/kaya/support/error_handler_helper.rb
kaya-0.0.8 lib/kaya/support/error_handler_helper.rb
kaya-0.0.7 lib/kaya/support/error_handler_helper.rb
kaya-0.0.6 lib/kaya/support/error_handler_helper.rb
kaya-0.0.5 lib/kaya/support/error_handler_helper.rb
kaya-0.0.4 lib/kaya/support/error_handler_helper.rb
kaya-0.0.3 lib/kaya/support/error_handler_helper.rb
kaya-0.0.2 lib/kaya/support/error_handler_helper.rb
kaya-0.0.1 lib/kaya/support/error_handler_helper.rb