Sha256: 6bbd9f73ced9cebb5aa728e45570f5121856da4b98a512aab5e16dd942581681

Contents?: true

Size: 364 Bytes

Versions: 11

Compression:

Stored size: 364 Bytes

Contents

module Grooveshark
  class InvalidAuthentication < Exception ; end
  class ReadOnlyAccess < Exception ; end
  class GeneralError < Exception ; end
  
  class ApiError < Exception
    attr_reader :code
  
    def initialize(fault)
      @code = fault['code']
      @message = fault['message']
    end
  
    def to_s
      "#{@code} - #{@message}"
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
grooveshark-0.2.10 lib/grooveshark/errors.rb
grooveshark-0.2.9 lib/grooveshark/errors.rb
grooveshark-0.2.8.2 lib/grooveshark/errors.rb
grooveshark-0.2.8.1 lib/grooveshark/errors.rb
grooveshark-0.2.8 lib/grooveshark/errors.rb
grooveshark-0.2.7 lib/grooveshark/errors.rb
grooveshark-0.2.6 lib/grooveshark/errors.rb
grooveshark-0.2.5 lib/grooveshark/errors.rb
grooveshark-0.2.4 lib/grooveshark/errors.rb
grooveshark-0.2.3 lib/grooveshark/errors.rb
grooveshark-0.2.2 lib/grooveshark/errors.rb