Exception: Execution::CommandFailure
- Inherits:
-
StandardError
- Object
- StandardError
- Execution::CommandFailure
- Defined in:
- lib/git_workflow/core_ext.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(command, result) ⇒ CommandFailure
constructor
A new instance of CommandFailure.
- #raise_if_required! ⇒ Object
Constructor Details
#initialize(command, result) ⇒ CommandFailure
Returns a new instance of CommandFailure.
50 51 52 53 |
# File 'lib/git_workflow/core_ext.rb', line 50 def initialize(command, result) super("Command '#{ command }' failed") @result = result end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
48 49 50 |
# File 'lib/git_workflow/core_ext.rb', line 48 def result @result end |
Instance Method Details
#raise_if_required! ⇒ Object
55 56 57 |
# File 'lib/git_workflow/core_ext.rb', line 55 def raise_if_required! raise self unless @result.exitstatus == 0 end |