Sha256: b2e82071d519087314bf76f0386cb5c823f8ce95489aa1d38151ddb32bdd63c1
Contents?: true
Size: 525 Bytes
Versions: 7
Compression:
Stored size: 525 Bytes
Contents
class ZabbixApi class BaseError < RuntimeError attr_accessor :response, :error, :error_message def initialize(message, response = nil) super(message) @response = response set_error! if @response end private def set_error! @error = @response['error'] @error_message = "#{@error['message']}: #{@error['data']}" rescue StandardError @error = nil @error_message = nil end end class ApiError < BaseError end class HttpError < BaseError end end
Version data entries
7 entries across 7 versions & 2 rubygems