Exception: ZabbixManager::BaseError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- ZabbixManager::BaseError
- Defined in:
- lib/zabbix_manager/classes/errors.rb
Overview
BaseError 是 ZabbixManager 模块中处理异常的基类
Instance Attribute Summary collapse
-
#error ⇒ Object
用于存储 Zabbix API 错误信息.
-
#error_message ⇒ Object
用于存储格式化后的错误消息.
-
#response ⇒ Object
用于存储响应对象.
Instance Method Summary collapse
-
#initialize(message, response = nil) ⇒ BaseError
constructor
初始化异常对象.
Constructor Details
#initialize(message, response = nil) ⇒ BaseError
初始化异常对象
14 15 16 17 18 |
# File 'lib/zabbix_manager/classes/errors.rb', line 14 def initialize(, response = nil) super() @response = response set_error! if @response end |
Instance Attribute Details
#error ⇒ Object
用于存储 Zabbix API 错误信息
9 10 11 |
# File 'lib/zabbix_manager/classes/errors.rb', line 9 def error @error end |
#error_message ⇒ Object
用于存储格式化后的错误消息
11 12 13 |
# File 'lib/zabbix_manager/classes/errors.rb', line 11 def @error_message end |
#response ⇒ Object
用于存储响应对象
7 8 9 |
# File 'lib/zabbix_manager/classes/errors.rb', line 7 def response @response end |