lib/legion/data/migration.rb in legion-data-0.1.0 vs lib/legion/data/migration.rb in legion-data-0.1.1
- old
+ new
@@ -14,15 +14,15 @@
def migrate(path, connection)
Legion::Logging.debug("Running Legion::Data.migrate with path: #{path}")
Sequel::Migrator.run(connection, path)
Legion::Logging.info('Legion::Data finished migrations')
- rescue Sequel::Migrator::Error => ex
- Legion::Logging.error(ex.message)
- raise ex
- rescue StandardError => ex
- Legion::Logging.error(ex.message)
- raise ex unless Legion::Settings[:data][:migrations][:continue_on_fail]
+ rescue Sequel::Migrator::Error => e
+ Legion::Logging.error(e.message)
+ raise e
+ rescue StandardError => e
+ Legion::Logging.error(e.message)
+ raise e unless Legion::Settings[:data][:migrations][:continue_on_fail]
end
end
end
end