You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: page_limiter.rb
    path of file: ./repos/gitlabhq/app/controllers/concerns
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

# Include this in your controller and call `limit_pages` in order
# to configure the limiter.
#
#   Examples:
#     class MyController < Application
    
  def check_page_number!(max_page_number)
    raise PageLimitNotANumberError unless max_page_number.is_a?(Integer)
    raise PageLimitNotSensibleError unless max_page_number > 0

    return if params[:page].blank?
    return if params[:page].to_i <= max_page_number

    record_page_limit_interception
    raise PageOutOfBoundsError, max_page_number
  end