Exception: Motion::UpgradeNotImplementedError
- Inherits:
-
ComponentError
- Object
- StandardError
- Error
- ComponentError
- Motion::UpgradeNotImplementedError
- Defined in:
- lib/motion/errors.rb
Instance Attribute Summary collapse
-
#current_revision ⇒ Object
readonly
Returns the value of attribute current_revision.
-
#previous_revision ⇒ Object
readonly
Returns the value of attribute previous_revision.
Attributes inherited from ComponentError
Instance Method Summary collapse
-
#initialize(component, previous_revision, current_revision) ⇒ UpgradeNotImplementedError
constructor
A new instance of UpgradeNotImplementedError.
Constructor Details
#initialize(component, previous_revision, current_revision) ⇒ UpgradeNotImplementedError
Returns a new instance of UpgradeNotImplementedError.
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/motion/errors.rb', line 109 def initialize(component, previous_revision, current_revision) super( component, "Cannot upgrade `#{component.class}` from a previous revision of the " \ "application (#{previous_revision}) to the current revision of the " \ "application (#{current_revision})\n" \ "\n" \ "By default, Motion does not allow components from other revisions " \ "of the application to be mounted because new code with old state " \ "can lead to unpredictable and unsafe behavior.\n" \ "\n" \ "Hint: If you would like to allow this component to survive " \ "deployments, consider providing an alternative implimentation for " \ "`#{component.class}.upgrade_from`." ) @previous_revision = previous_revision @current_revision = current_revision end |
Instance Attribute Details
#current_revision ⇒ Object (readonly)
Returns the value of attribute current_revision.
106 107 108 |
# File 'lib/motion/errors.rb', line 106 def current_revision @current_revision end |
#previous_revision ⇒ Object (readonly)
Returns the value of attribute previous_revision.
106 107 108 |
# File 'lib/motion/errors.rb', line 106 def previous_revision @previous_revision end |