Exception: Copyleaks::CommandException
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Copyleaks::CommandException
- Defined in:
- lib/copyleaks/models/exceptions/command_exception.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response:, used_by:) ⇒ CommandException
constructor
A new instance of CommandException.
Constructor Details
#initialize(response:, used_by:) ⇒ CommandException
Returns a new instance of CommandException.
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/copyleaks/models/exceptions/command_exception.rb', line 28 def initialize(response:, used_by:) @response = response @used_by = used_by = "---------Copyleaks SDK Error (#{used_by})---------\n\n" += "status code: #{response.code}\n\n" += "response body:\n#{response.body.to_json}\n\n" unless response.body.nil? += "-------------------------------------\n" super end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
26 27 28 |
# File 'lib/copyleaks/models/exceptions/command_exception.rb', line 26 def response @response end |