Exception: Krill::KrillError

Inherits:
KrillBaseError show all
Defined in:
lib/krill/protocol_sandbox.rb

Overview

Exception class for errors during execution of protocols

Instance Attribute Summary collapse

Attributes inherited from KrillBaseError

#error, #namespace, #operation_type

Instance Method Summary collapse

Methods inherited from KrillBaseError

#error_backtrace, #error_message, #operation_path

Constructor Details

#initialize(job:, error:, message: 'Error executing protocol', namespace: '') ⇒ KrillError

Create a KrillError object for the given job and exception with an optional message.

Parameters:

  • job (Job)

    the job where error occurred

  • error (Exception)

    the error

  • message (String)

    the error message



218
219
220
221
222
223
224
225
226
# File 'lib/krill/protocol_sandbox.rb', line 218

def initialize(job:, error:, message: 'Error executing protocol', namespace: '')
  @job = job
  super(
    operation_type: @job.operation_type,
    error: error,
    message: message,
    namespace: namespace
  )
end

Instance Attribute Details

#jobObject (readonly)



210
211
212
# File 'lib/krill/protocol_sandbox.rb', line 210

def job
  @job
end