Sha256: f2c9b5d80552bee11a2be849ba8ad00ee6c3f294cac0d5ac600fb1917c814211

Contents?: true

Size: 586 Bytes

Versions: 8

Compression:

Stored size: 586 Bytes

Contents

# encoding: utf-8

module Github #:nodoc
  # Raised when Github returns the HTTP status code 404
  module Error
    class ClientError < GithubError
      attr_reader :problem, :summary, :resolution

      def initialize(message)
        super(message)
      end

      def generate_message(attributes)
        @problem = attributes[:problem]
        @summary = attributes[:summary]
        @resolution = attributes[:resolution]
        "\nProblem:\n #{@problem}"+
        "\nSummary:\n #{@summary}"+
        "\nResolution:\n #{@resolution}"
      end
    end
  end # Error
end # Github

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
github_api-0.14.2 lib/github_api/error/client_error.rb
github_api-0.14.1 lib/github_api/error/client_error.rb
github_api-0.14.0 lib/github_api/error/client_error.rb
github_api-0.13.1 lib/github_api/error/client_error.rb
github_api-0.13.0 lib/github_api/error/client_error.rb
github_api-0.12.4 lib/github_api/error/client_error.rb
github_api-0.12.3 lib/github_api/error/client_error.rb
github_api-0.12.2 lib/github_api/error/client_error.rb