Exception: Open4::SpawnError
- Defined in:
- lib/vendor/open4/lib/open4.rb
Instance Attribute Summary collapse
-
#cmd ⇒ Object
readonly
Returns the value of attribute cmd.
-
#signals ⇒ Object
readonly
Returns the value of attribute signals.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #exitstatus ⇒ Object
-
#initialize(cmd, status) ⇒ SpawnError
constructor
A new instance of SpawnError.
Constructor Details
#initialize(cmd, status) ⇒ SpawnError
Returns a new instance of SpawnError.
140 141 142 143 144 145 146 147 148 149 |
# File 'lib/vendor/open4/lib/open4.rb', line 140 def initialize cmd, status @cmd, @status = cmd, status @signals = {} if status.signaled? @signals['termsig'] = status.termsig @signals['stopsig'] = status.stopsig end sigs = @signals.map{|k,v| "#{ k }:#{ v.inspect }"}.join(' ') super "cmd <#{ cmd }> failed with status <#{ exitstatus.inspect }> signals <#{ sigs }>" end |
Instance Attribute Details
#cmd ⇒ Object (readonly)
Returns the value of attribute cmd.
134 135 136 |
# File 'lib/vendor/open4/lib/open4.rb', line 134 def cmd @cmd end |
#signals ⇒ Object (readonly)
Returns the value of attribute signals.
136 137 138 |
# File 'lib/vendor/open4/lib/open4.rb', line 136 def signals @signals end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
135 136 137 |
# File 'lib/vendor/open4/lib/open4.rb', line 135 def status @status end |
Instance Method Details
#exitstatus ⇒ Object
137 138 139 |
# File 'lib/vendor/open4/lib/open4.rb', line 137 def exitstatus @status.exitstatus end |