Exception: Hummingbird::PlanError

Inherits:
Exception
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(msg, planned_files, already_run_migrations) ⇒ PlanError

Returns a new instance of PlanError.

Parameters:

See Also:



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_migrationsArray<Hash{Symbol => String}> (readonly)

Returns The Database#already_run_migrations at the time of the plan error.

Returns:

See Also:



11
12
13
# File 'lib/hummingbird/plan_error.rb', line 11

def already_run_migrations
  @already_run_migrations
end

#planned_filesArray<String> (readonly)

Returns The Hummingbird::Plan#planned_files at the time of the plan error.

Returns:

See Also:



17
18
19
# File 'lib/hummingbird/plan_error.rb', line 17

def planned_files
  @planned_files
end