Exception: RestPki::RestPkiError

Inherits:
RestBaseError show all
Defined in:
lib/rest_pki/restpki_error.rb

Instance Attribute Summary collapse

Attributes inherited from RestBaseError

#url, #verb

Instance Method Summary collapse

Constructor Details

#initialize(verb, url, error_code, detail) ⇒ RestPkiError

Returns a new instance of RestPkiError.



6
7
8
9
10
11
12
13
14
# File 'lib/rest_pki/restpki_error.rb', line 6

def initialize(verb, url, error_code, detail)
    message = "REST PKI action #{verb} #{url} error: #{error_code}"
    unless detail.to_s.blank?
        message += " (#{detail})"
    end
    super(message, verb, url)
    @error_code = error_code
    @detail = detail
end

Instance Attribute Details

#detailObject (readonly)

Returns the value of attribute detail.



4
5
6
# File 'lib/rest_pki/restpki_error.rb', line 4

def detail
  @detail
end

#error_codeObject (readonly)

Returns the value of attribute error_code.



4
5
6
# File 'lib/rest_pki/restpki_error.rb', line 4

def error_code
  @error_code
end