Exception: Trailblazer::Activity::Circuit::IllegalSignalError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Trailblazer::Activity::Circuit::IllegalSignalError
- Defined in:
- lib/trailblazer/activity/circuit.rb
Overview
Common reasons to raise IllegalSignalError are when returning signals from
* macros which are not registered
* subprocesses where parent process have not registered that signal
* ciruit interface steps, for example: `step task: method(:validate)`
Instance Attribute Summary collapse
- #signal ⇒ Object readonly
- #task ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(task, signal:, outputs:, exec_context:) ⇒ IllegalSignalError
constructor
A new instance of IllegalSignalError.
Constructor Details
#initialize(task, signal:, outputs:, exec_context:) ⇒ IllegalSignalError
Returns a new instance of IllegalSignalError.
90 91 92 93 94 95 96 97 98 99 |
# File 'lib/trailblazer/activity/circuit.rb', line 90 def initialize(task, signal:, outputs:, exec_context:) @task = task @signal = signal = "#{exec_context.class}: \n" \ "\e[31mUnrecognized Signal `#{signal.inspect}` returned from #{task.inspect}. Registered signals are, \e[0m\n" \ "\e[32m#{outputs.keys.map(&:inspect).join("\n")}\e[0m" super() end |
Instance Attribute Details
#signal ⇒ Object (readonly)
88 89 90 |
# File 'lib/trailblazer/activity/circuit.rb', line 88 def signal @signal end |
#task ⇒ Object (readonly)
88 89 90 |
# File 'lib/trailblazer/activity/circuit.rb', line 88 def task @task end |