Exception: Hummingbird::PlanError
- Inherits:
-
Exception
- Object
- Exception
- Hummingbird::PlanError
- Defined in:
- lib/hummingbird/plan_error.rb
Overview
Exception class with extra information available to examine what caused a validation error comparing the planned migrations against the recorded migrations.
Instance Attribute Summary collapse
-
#already_run_migrations ⇒ Array<Hash{Symbol => String}>
readonly
The Database#already_run_migrations at the time of the plan error.
-
#planned_files ⇒ Array<String>
readonly
The Hummingbird::Plan#planned_files at the time of the plan error.
Instance Method Summary collapse
-
#initialize(msg, planned_files, already_run_migrations) ⇒ PlanError
constructor
A new instance of PlanError.
Constructor Details
#initialize(msg, planned_files, already_run_migrations) ⇒ PlanError
Returns a new instance of PlanError.
32 33 34 35 36 |
# File 'lib/hummingbird/plan_error.rb', line 32 def initialize(msg,planned_files,already_run_migrations) super(msg) @planned_files = planned_files @already_run_migrations = already_run_migrations end |
Instance Attribute Details
#already_run_migrations ⇒ Array<Hash{Symbol => String}> (readonly)
Returns The Database#already_run_migrations at the time of the plan error.
11 12 13 |
# File 'lib/hummingbird/plan_error.rb', line 11 def already_run_migrations @already_run_migrations end |
#planned_files ⇒ Array<String> (readonly)
Returns The Hummingbird::Plan#planned_files at the time of the plan error.
17 18 19 |
# File 'lib/hummingbird/plan_error.rb', line 17 def planned_files @planned_files end |