Exception: Shifty::UnshareableValue

Inherits:
PolicyError show all
Defined in:
lib/shifty/errors.rb

Overview

Raised at the handoff itself when a value cannot cross the boundary under the effective policy (cannot be frozen or deep-copied).

Instance Attribute Summary

Attributes inherited from PolicyError

#policy, #value, #worker

Instance Method Summary collapse

Methods inherited from PolicyError

#cause

Constructor Details

#initialize(worker:, policy:, value:, cause: nil) ⇒ UnshareableValue

Returns a new instance of UnshareableValue.



102
103
104
105
106
107
108
# File 'lib/shifty/errors.rb', line 102

def initialize(worker:, policy:, value:, cause: nil)
  @worker = worker
  @policy = policy
  @value = value
  @wrapped_cause = cause
  super(build_message)
end