Exception: Pione::Command::SpawnError
- Inherits:
-
CommandException
- Object
- StandardError
- CommandException
- Pione::Command::SpawnError
- Defined in:
- lib/pione/command/command-exception.rb
Overview
SpawnError is raised when the command failed to run.
Class Method Summary collapse
-
.child_process_is_dead(caller, callee, argv) ⇒ SpawnError
Create a spawn error caused that child process is dead.
Instance Method Summary collapse
-
#initialize(caller, callee, argv, cause) ⇒ SpawnError
constructor
A new instance of SpawnError.
- #message ⇒ Object
Constructor Details
#initialize(caller, callee, argv, cause) ⇒ SpawnError
Returns a new instance of SpawnError.
21 22 23 24 25 26 |
# File 'lib/pione/command/command-exception.rb', line 21 def initialize(caller, callee, argv, cause) @caller = caller @callee = callee @argv = argv @cause = cause end |
Class Method Details
.child_process_is_dead(caller, callee, argv) ⇒ SpawnError
Create a spawn error caused that child process is dead
17 18 19 |
# File 'lib/pione/command/command-exception.rb', line 17 def self.child_process_is_dead(caller, callee, argv) new(caller, callee, argv, "child process is dead") end |
Instance Method Details
#message ⇒ Object
28 29 30 31 |
# File 'lib/pione/command/command-exception.rb', line 28 def args = {caller: @caller, callee: @callee, argv: @argv, cause: @cause} '"%{caller}" has failed to spawn "%{callee}" %{argv}: %{cause}' % args end |