Exception: Hyrax::DOI::DataCiteClient::Error
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Hyrax::DOI::DataCiteClient::Error
- Defined in:
- app/services/hyrax/doi/datacite_client.rb
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(msg = '', response = nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(msg = '', response = nil) ⇒ Error
Returns a new instance of Error.
91 92 93 94 95 96 97 98 99 |
# File 'app/services/hyrax/doi/datacite_client.rb', line 91 def initialize(msg = '', response = nil) if response @status = response.status msg += "\n#{@status}: #{response.reason_phrase}\n" msg += response.body end super(msg) end |
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status.
86 87 88 |
# File 'app/services/hyrax/doi/datacite_client.rb', line 86 def status @status end |