Exception: Kohagi::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Kohagi::Error
- Defined in:
- lib/kohagi/errors.rb
Overview
Base for every error the client raises. Carries the process exit code and the captured stderr so the caller can log or branch on them.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#exit_code ⇒ Object
readonly
Returns the value of attribute exit_code.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
Instance Method Summary collapse
-
#initialize(stderr = nil, exit_code: nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(stderr = nil, exit_code: nil) ⇒ Error
Returns a new instance of Error.
9 10 11 12 13 |
# File 'lib/kohagi/errors.rb', line 9 def initialize(stderr = nil, exit_code: nil) @stderr = stderr @exit_code = exit_code super((stderr, exit_code)) end |
Instance Attribute Details
#exit_code ⇒ Object (readonly)
Returns the value of attribute exit_code.
7 8 9 |
# File 'lib/kohagi/errors.rb', line 7 def exit_code @exit_code end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
7 8 9 |
# File 'lib/kohagi/errors.rb', line 7 def stderr @stderr end |