Exception: Motion::UnrepresentableStateError
- Inherits:
-
InvalidComponentStateError
- Object
- StandardError
- Error
- ComponentError
- InvalidComponentStateError
- Motion::UnrepresentableStateError
- Defined in:
- lib/motion/errors.rb
Instance Attribute Summary
Attributes inherited from ComponentError
Instance Method Summary collapse
-
#initialize(component, cause, failing_ivars) ⇒ UnrepresentableStateError
constructor
A new instance of UnrepresentableStateError.
Constructor Details
#initialize(component, cause, failing_ivars) ⇒ UnrepresentableStateError
Returns a new instance of UnrepresentableStateError.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/motion/errors.rb', line 71 def initialize(component, cause, failing_ivars) super( component, "Some state prevented `#{component.class}` from being serialized " \ "into a string. Motion components must be serializable using " \ "`Marshal.dump`. Many types of objects are not serializable " \ "including procs, references to anonymous classes, and more. See the " \ "documentation for `Marshal.dump` for more information.\n" \ "\n" \ "The specific error from `Marshal.dump` was: #{cause}\n" \ "\n" \ "unserializable ivars: #{failing_ivars.join(", ")}\n"\ "\n" \ "\n" \ "Hint: Ensure that any exotic state variables in " \ "`#{component.class}` are removed or replaced." ) end |