module ROM
  module SQL
    module Commands
      module ErrorWrapper
        def call(*args)
          super
        rescue *ERROR_MAP.keys => e
          raise ERROR_MAP[e.class], e
        end
      end
    end
  end
end

module ROM
  module SQL
    module Commands
      # Shared error handler for all SQL commands
      #
      # @api private
      module ErrorWrapper
        # Handle Sequel errors and re-raise ROM-specific errors
        #
        # @api public
        def call(*args)
          super
        rescue *ERROR_MAP.keys => e
          raise ERROR_MAP[e.class], e
        end
      end
    end
  end
end

Add some docs to error wrapper
Add some docs to error wrapper [ci skip]
