lib/grooveshark/errors.rb in grooveshark-0.2.10 vs lib/grooveshark/errors.rb in grooveshark-0.2.11
- old
+ new
@@ -1,17 +1,17 @@
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
\ No newline at end of file