Exception: Open4::SpawnError
- Defined in:
- lib/ec2/oem/open4.rb
Instance Attribute Summary collapse
-
#cmd ⇒ Object
readonly
–{{{.
-
#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.
96 97 98 99 100 101 102 103 104 105 |
# File 'lib/ec2/oem/open4.rb', line 96 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)
–{{{
90 91 92 |
# File 'lib/ec2/oem/open4.rb', line 90 def cmd @cmd end |
#signals ⇒ Object (readonly)
Returns the value of attribute signals.
92 93 94 |
# File 'lib/ec2/oem/open4.rb', line 92 def signals @signals end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
91 92 93 |
# File 'lib/ec2/oem/open4.rb', line 91 def status @status end |
Instance Method Details
#exitstatus ⇒ Object
93 94 95 |
# File 'lib/ec2/oem/open4.rb', line 93 def exitstatus @status.exitstatus end |