Exception: EXEL::Error::JobTermination
- Inherits:
-
Exception
- Object
- Exception
- EXEL::Error::JobTermination
- Defined in:
- lib/exel/error/job_termination.rb
Overview
If a processor raises a JobTermination exception, the job will immediately stop running without raising anything. This is useful if you want to stop a job without triggering any kind of retry mechanism, for example.
Constant Summary collapse
- CMDS =
[:info, :warn, :error].freeze
Instance Attribute Summary collapse
-
#cmd ⇒ Object
readonly
Inherit from Exception so it won’t be rescued and can propagate to ASTNode#start.
Instance Method Summary collapse
-
#initialize(message = nil, cmd = :error) ⇒ JobTermination
constructor
A new instance of JobTermination.
Constructor Details
#initialize(message = nil, cmd = :error) ⇒ JobTermination
Returns a new instance of JobTermination.
13 14 15 16 |
# File 'lib/exel/error/job_termination.rb', line 13 def initialize( = nil, cmd = :error) super() @cmd = CMDS.include?(cmd) ? cmd : :error end |
Instance Attribute Details
#cmd ⇒ Object (readonly)
Inherit from Exception so it won’t be rescued and can propagate to ASTNode#start
9 10 11 |
# File 'lib/exel/error/job_termination.rb', line 9 def cmd @cmd end |