class Parse::ParseProtocolError
An exception class raised when the REST API returns an error. The error code and message will be parsed out of the HTTP response, which is also included in the response attribute.
Attributes
code[RW]
error[RW]
response[RW]
Public Class Methods
new(response)
click to toggle source
Calls superclass method
# File lib/parse/error.rb, line 17 def initialize(response) @response = response if response @code = response["code"] @error = response["error"] end super("#{@code}: #{@error}") end
Public Instance Methods
message=(msg)
click to toggle source
# File lib/parse/error.rb, line 31 def message=(msg) @message = msg end
to_s()
click to toggle source
Calls superclass method
# File lib/parse/error.rb, line 27 def to_s @message || super end