Exception: Sharepoint::SPException

Inherits:
SharepointError show all
Defined in:
lib/sharepoint-ruby.rb

Instance Method Summary collapse

Constructor Details

#initialize(data, uri = nil, body = nil) ⇒ SPException

Returns a new instance of SPException.



10
11
12
13
14
# File 'lib/sharepoint-ruby.rb', line 10

def initialize data, uri = nil, body = nil
  @data = data['error']
  @uri  = uri
  @body = body
end

Instance Method Details

#codeObject



18
# File 'lib/sharepoint-ruby.rb', line 18

def code         ; @data['code'] ; end

#inspectObject



22
23
24
# File 'lib/sharepoint-ruby.rb', line 22

def inspect
  "#<Sharepoint::SPException: #{{'error'=>@data}}>"
end

#langObject



16
# File 'lib/sharepoint-ruby.rb', line 16

def lang         ; @data['message']['lang']  ; end

#messageObject



17
# File 'lib/sharepoint-ruby.rb', line 17

def message      ; @data['message']['value'] ; end

#request_bodyObject



20
# File 'lib/sharepoint-ruby.rb', line 20

def request_body ; @body ; end

#uriObject



19
# File 'lib/sharepoint-ruby.rb', line 19

def uri          ; @uri ; end