Exception: SiteMandala::SiteMandalaError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/sitemandala/sitemandala.rb

Direct Known Subclasses

BadRequest, Unauthorized

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ SiteMandalaError

Returns a new instance of SiteMandalaError.



5
6
7
8
9
# File 'lib/sitemandala/sitemandala.rb', line 5

def initialize(data)
  @data = data
  extra = @data.ResultData ? "\nExtra result data: #{@data.ResultData}" : ""
  super "The SiteMandala API responded with the following error - #{@data.Code}: #{@data.Message}#{extra}"
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



4
5
6
# File 'lib/sitemandala/sitemandala.rb', line 4

def data
  @data
end