lib/hanami/model/error.rb in hanami-model-0.7.0 vs lib/hanami/model/error.rb in hanami-model-1.0.0.beta1
- old
+ new
@@ -6,11 +6,11 @@
#
# @since 0.5.1
class Error < ::StandardError
# @api private
# @since 0.7.0
- @__mapping__ = Concurrent::Map.new # rubocop:disable Style/VariableNumber
+ @__mapping__ = Concurrent::Map.new
# @api private
# @since 0.7.0
def self.for(exception)
mapping.fetch(exception.class, self).new(exception)
@@ -85,8 +85,20 @@
# @since 0.6.1
class CheckConstraintViolationError < Error
def initialize(message = 'Check constraint has been violated')
super
end
+ end
+
+ # Unknown database type error for repository auto-mapping
+ #
+ # @since 1.0.0.beta1
+ class UnknownDatabaseTypeError < Error
+ end
+
+ # Unknown primary key error
+ #
+ # @since 1.0.0.beta1
+ class MissingPrimaryKeyError < Error
end
end
end