Exception: Nexpose::APIError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/nexpose/error.rb

Direct Known Subclasses

AuthenticationFailed

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(req, reason = '') ⇒ APIError

Returns a new instance of APIError.



5
6
7
8
# File 'lib/nexpose/error.rb', line 5

def initialize(req, reason = '')
  @req = req
  @reason = reason
end

Instance Attribute Details

#reasonObject

Returns the value of attribute reason.



3
4
5
# File 'lib/nexpose/error.rb', line 3

def reason
  @reason
end

#reqObject

Returns the value of attribute req.



3
4
5
# File 'lib/nexpose/error.rb', line 3

def req
  @req
end

Instance Method Details

#to_sObject



10
11
12
# File 'lib/nexpose/error.rb', line 10

def to_s
  "NexposeAPI: #{@reason}"
end