Exception: ZabbixApi::BaseError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/zabbixapi/classes/errors.rb

Direct Known Subclasses

ApiError, HttpError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, response = nil) ⇒ BaseError

Returns a new instance of BaseError.


5
6
7
8
9
10
# File 'lib/zabbixapi/classes/errors.rb', line 5

def initialize(message, response = nil)
  super(message)
  @response = response

  set_error! if @response
end

Instance Attribute Details

#errorObject

Returns the value of attribute error


3
4
5
# File 'lib/zabbixapi/classes/errors.rb', line 3

def error
  @error
end

#error_messageObject

Returns the value of attribute error_message


3
4
5
# File 'lib/zabbixapi/classes/errors.rb', line 3

def error_message
  @error_message
end

#responseObject

Returns the value of attribute response


3
4
5
# File 'lib/zabbixapi/classes/errors.rb', line 3

def response
  @response
end