Exception: HttpMimic::CommandError
- Defined in:
- lib/http_mimic/exceptions.rb
Overview
Raised when the curl command fails or returns a non-zero exit status
Direct Known Subclasses
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#exit_code ⇒ Object
readonly
Returns the value of attribute exit_code.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
Instance Method Summary collapse
-
#initialize(message, exit_code: nil, stderr: nil, command: nil, response: nil) ⇒ CommandError
constructor
A new instance of CommandError.
Constructor Details
#initialize(message, exit_code: nil, stderr: nil, command: nil, response: nil) ⇒ CommandError
Returns a new instance of CommandError.
14 15 16 17 18 19 20 |
# File 'lib/http_mimic/exceptions.rb', line 14 def initialize(, exit_code: nil, stderr: nil, command: nil, response: nil) super() @exit_code = exit_code @stderr = stderr @command = command @response = response end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
12 13 14 |
# File 'lib/http_mimic/exceptions.rb', line 12 def command @command end |
#exit_code ⇒ Object (readonly)
Returns the value of attribute exit_code.
12 13 14 |
# File 'lib/http_mimic/exceptions.rb', line 12 def exit_code @exit_code end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
12 13 14 |
# File 'lib/http_mimic/exceptions.rb', line 12 def response @response end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
12 13 14 |
# File 'lib/http_mimic/exceptions.rb', line 12 def stderr @stderr end |