Exception: Flor::Caller::SpawnNonZeroExitError
- Inherits:
-
SpawnError
- Object
- StandardError
- SpawnError
- Flor::Caller::SpawnNonZeroExitError
- Defined in:
- lib/flor/unit/caller.rb
Instance Attribute Summary collapse
-
#err ⇒ Object
readonly
Returns the value of attribute err.
-
#out ⇒ Object
readonly
Returns the value of attribute out.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Attributes inherited from SpawnError
Instance Method Summary collapse
- #add_details(details) ⇒ Object
-
#initialize(conf, ctx, status, stdout, stderr) ⇒ SpawnNonZeroExitError
constructor
A new instance of SpawnNonZeroExitError.
Methods inherited from SpawnError
Constructor Details
#initialize(conf, ctx, status, stdout, stderr) ⇒ SpawnNonZeroExitError
Returns a new instance of SpawnNonZeroExitError.
302 303 304 305 306 307 308 309 310 311 312 313 |
# File 'lib/flor/unit/caller.rb', line 302 def initialize(conf, ctx, status, stdout, stderr) @status = s = status @stdout = stdout.read @stderr = stderr.read ctx[:pid] ||= status.pid msg = @stderr.strip.split("\n").last super(conf, ctx, "(code: #{s.exitstatus}, pid: #{s.pid}) #{msg}") end |
Instance Attribute Details
#err ⇒ Object (readonly)
Returns the value of attribute err.
300 301 302 |
# File 'lib/flor/unit/caller.rb', line 300 def err @err end |
#out ⇒ Object (readonly)
Returns the value of attribute out.
300 301 302 |
# File 'lib/flor/unit/caller.rb', line 300 def out @out end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
300 301 302 |
# File 'lib/flor/unit/caller.rb', line 300 def status @status end |
Instance Method Details
#add_details(details) ⇒ Object
315 316 317 318 319 320 |
# File 'lib/flor/unit/caller.rb', line 315 def add_details(details) details[:status] = status.to_s details[:stdout] = @stdout details[:stderr] = @stderr end |