class Motion::UnrepresentableStateError

Public Class Methods

new(component, cause) click to toggle source
Calls superclass method Motion::ComponentError::new
# File lib/motion/errors.rb, line 71
def initialize(component, cause)
  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" \
    "Hint: Ensure that any exotic state variables in " \
    "`#{component.class}` are removed or replaced."
  )
end