Exception: RestPki::RestPkiError
- Inherits:
-
RestBaseError
- Object
- StandardError
- RestBaseError
- RestPki::RestPkiError
- Defined in:
- lib/rest_pki/restpki_error.rb
Instance Attribute Summary collapse
-
#detail ⇒ Object
readonly
Returns the value of attribute detail.
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
Attributes inherited from RestBaseError
Instance Method Summary collapse
-
#initialize(verb, url, error_code, detail) ⇒ RestPkiError
constructor
A new instance of RestPkiError.
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) = "REST PKI action #{verb} #{url} error: #{error_code}" unless detail.to_s.blank? += " (#{detail})" end super(, verb, url) @error_code = error_code @detail = detail end |
Instance Attribute Details
#detail ⇒ Object (readonly)
Returns the value of attribute detail.
4 5 6 |
# File 'lib/rest_pki/restpki_error.rb', line 4 def detail @detail end |
#error_code ⇒ Object (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 |