lib/hanami/model/configuration.rb in hanami-model-1.3.0.beta1 vs lib/hanami/model/configuration.rb in hanami-model-1.3.0
- old
+ new
@@ -123,10 +123,11 @@
# @since 1.0.0
# @api private
def logger=(value)
return if value.nil?
+
gateway.use_logger(@logger = value)
end
# @raise [Hanami::Model::UnknownDatabaseAdapterError] if `url` is blank,
# or it uses an unknown adapter.
@@ -135,9 +136,10 @@
# @api private
def rom
@rom ||= ROM::Configuration.new(@backend, @url, infer_relations: false)
rescue => e
raise UnknownDatabaseAdapterError.new(@url) if e.message =~ /adapters/
+
raise e
end
# @raise [Hanami::Model::UnknownDatabaseAdapterError] if `url` is blank,
# or it uses an unknown adapter.