lib/hanami/model/error.rb in hanami-model-1.0.0.beta2 vs lib/hanami/model/error.rb in hanami-model-1.0.0.beta3

- old
+ new

@@ -37,54 +37,66 @@ # Error for invalid raw command syntax # # @since 0.5.0 class InvalidCommandError < Error + # @since 0.5.0 + # @api private def initialize(message = 'Invalid command') super end end # Error for Constraint Violation # # @since 0.7.0 class ConstraintViolationError < Error + # @since 0.7.0 + # @api private def initialize(message = 'Constraint has been violated') super end end # Error for Unique Constraint Violation # # @since 0.6.1 class UniqueConstraintViolationError < Error + # @since 0.6.1 + # @api private def initialize(message = 'Unique constraint has been violated') super end end # Error for Foreign Key Constraint Violation # # @since 0.6.1 class ForeignKeyConstraintViolationError < Error + # @since 0.6.1 + # @api private def initialize(message = 'Foreign key constraint has been violated') super end end # Error for Not Null Constraint Violation # # @since 0.6.1 class NotNullConstraintViolationError < Error + # @since 0.6.1 + # @api private def initialize(message = 'NOT NULL constraint has been violated') super end end # Error for Check Constraint Violation raised by Sequel # # @since 0.6.1 class CheckConstraintViolationError < Error + # @since 0.6.1 + # @api private def initialize(message = 'Check constraint has been violated') super end end