lib/hanami/model/error.rb in hanami-model-1.3.2 vs lib/hanami/model/error.rb in hanami-model-1.3.3

- old
+ new

@@ -1,7 +1,9 @@ -require 'concurrent' +# frozen_string_literal: true +require "concurrent" + module Hanami module Model # Default Error class # # @since 0.5.1 @@ -39,65 +41,65 @@ # # @since 0.5.0 class InvalidCommandError < Error # @since 0.5.0 # @api private - def initialize(message = 'Invalid command') + 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') + def initialize(message = "Constraint has been violated") super end end # Error for Unique Constraint Violation # # @since 0.6.1 class UniqueConstraintViolationError < ConstraintViolationError # @since 0.6.1 # @api private - def initialize(message = 'Unique constraint has been violated') + def initialize(message = "Unique constraint has been violated") super end end # Error for Foreign Key Constraint Violation # # @since 0.6.1 class ForeignKeyConstraintViolationError < ConstraintViolationError # @since 0.6.1 # @api private - def initialize(message = 'Foreign key constraint has been violated') + def initialize(message = "Foreign key constraint has been violated") super end end # Error for Not Null Constraint Violation # # @since 0.6.1 class NotNullConstraintViolationError < ConstraintViolationError # @since 0.6.1 # @api private - def initialize(message = 'NOT NULL constraint has been violated') + 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 < ConstraintViolationError # @since 0.6.1 # @api private - def initialize(message = 'Check constraint has been violated') + def initialize(message = "Check constraint has been violated") super end end # Unknown database type error for repository auto-mapping