Sha256: 89681bd7bf0e90ea4e6509993b0062119d2917fcc1796d9fca46c31d57122ec4

Contents?: true

Size: 270 Bytes

Versions: 5

Compression:

Stored size: 270 Bytes

Contents

module Schoolfinder
  class Error < Exception

    attr_reader :code, :error

    def initialize(code, error)
      @code = code
      @error = error
      super(message)
    end

    def message
      "Schoolfinder Error: #{@error} (code: #{@code})"
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
schoolfinder-0.4.3 lib/schoolfinder/error.rb
schoolfinder-0.4.2 lib/schoolfinder/error.rb
schoolfinder-0.4.1 lib/schoolfinder/error.rb
schoolfinder-0.4.0 lib/schoolfinder/error.rb
schoolfinder-0.3.1 lib/schoolfinder/error.rb