Sha256: 51cf4472f420fcc14d29340d2d8092de145aa5f2a4b6f2f3ff4deec6b807b514

Contents?: true

Size: 926 Bytes

Versions: 73

Compression:

Stored size: 926 Bytes

Contents

# encoding: utf-8
module Mutx
  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 Mutx::Error::TaskNotFound
            ["Task Name Error",exception.message]
          when Mutx::Error::Result
            ["Result Error", excetion.message]
          when Mutx::Error::MutxFile
            ["Mutx File", exception.message]
          when Mutx::Error::MutxDir
            ["Mutx File", exception.message]
          when Mutx::Error::Help
            ["Help Error", exception.message]
          else
            ["Unknown Error", "#{exception.message}#{exception.backtrace}"]
        end
      end
    end
  end
end


Version data entries

73 entries across 73 versions & 1 rubygems

Version Path
mutx-0.2.9 lib/mutx/support/error_handler_helper.rb
mutx-0.2.8 lib/mutx/support/error_handler_helper.rb
mutx-0.2.7 lib/mutx/support/error_handler_helper.rb
mutx-0.2.6 lib/mutx/support/error_handler_helper.rb
mutx-0.2.5 lib/mutx/support/error_handler_helper.rb
mutx-0.2.4 lib/mutx/support/error_handler_helper.rb
mutx-0.2.3 lib/mutx/support/error_handler_helper.rb
mutx-0.2.2 lib/mutx/support/error_handler_helper.rb
mutx-0.2.1 lib/mutx/support/error_handler_helper.rb
mutx-0.2.0 lib/mutx/support/error_handler_helper.rb
mutx-0.1.69 lib/mutx/support/error_handler_helper.rb
mutx-0.1.68 lib/mutx/support/error_handler_helper.rb
mutx-0.1.67 lib/mutx/support/error_handler_helper.rb
mutx-0.1.66 lib/mutx/support/error_handler_helper.rb
mutx-0.1.65 lib/mutx/support/error_handler_helper.rb
mutx-0.1.64 lib/mutx/support/error_handler_helper.rb
mutx-0.1.63 lib/mutx/support/error_handler_helper.rb
mutx-0.1.62 lib/mutx/support/error_handler_helper.rb
mutx-0.1.61 lib/mutx/support/error_handler_helper.rb
mutx-0.1.60 lib/mutx/support/error_handler_helper.rb