Sha256: 0dfdd00fb7f82145300e402b1bdfe925ffddc3b84dc3ecd29662cafa0a3b2e6e

Contents?: true

Size: 456 Bytes

Versions: 25

Compression:

Stored size: 456 Bytes

Contents

module Crowdin
  class API

    module Errors
      class Error < StandardError
        attr_reader :error_code
        attr_reader :error_message
        attr_reader :message

        def initialize(error_code, error_message)
          @error_code    = error_code.to_i
          @error_message = error_message
          @message = "#{error_code}: #{error_message}"
        end

        def to_s
          @message
        end
      end
    end

  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
crowdin-api-0.6.0 lib/crowdin-api/errors.rb
crowdin-api-0.5.0 lib/crowdin-api/errors.rb
crowdin-api-0.4.1 lib/crowdin-api/errors.rb
crowdin-api-0.4.0 lib/crowdin-api/errors.rb
crowdin-api-0.4.0.pre lib/crowdin-api/errors.rb
crowdin-api-0.3.0 lib/crowdin-api/errors.rb
crowdin-api-0.2.8 lib/crowdin-api/errors.rb
crowdin-api-0.2.7 lib/crowdin-api/errors.rb
crowdin-api-0.2.6 lib/crowdin-api/errors.rb
crowdin-api-0.2.5 lib/crowdin-api/errors.rb
crowdin-api-0.2.4 lib/crowdin-api/errors.rb
crowdin-api-0.2.3 lib/crowdin-api/errors.rb
crowdin-api-0.2.2 lib/crowdin-api/errors.rb
crowdin-api-0.2.1 lib/crowdin-api/errors.rb
crowdin-api-0.2.0 lib/crowdin-api/errors.rb
crowdin-api-0.0.11 lib/crowdin-api/errors.rb
crowdin-api-0.0.10 lib/crowdin-api/errors.rb
crowdin-api-0.0.9 lib/crowdin-api/errors.rb
crowdin-api-0.0.8 lib/crowdin-api/errors.rb
crowdin-api-0.0.7 lib/crowdin-api/errors.rb