Sha256: db053aa072029baf436f564bca94c672177a6964ce7b2c0d0148c207d78f102d

Contents?: true

Size: 570 Bytes

Versions: 28

Compression:

Stored size: 570 Bytes

Contents

module Adeia

  class Error < StandardError; end

  class LoginRequired < Error

    def to_s
      I18n.t("exceptions.messages.login_required")
    end

  end

  class AccessDenied < Error

    def to_s
      I18n.t("exceptions.messages.access_denied")
    end

  end

  class MissingParams < Error

    def initialize(params)
      @params = params
    end

    def to_s
      I18n.t("exceptions.messages.missing_params", params: @params)
    end

  end

  class MissingUserModel < Error

    def to_s
      "A model `User` is missing in the app !"
    end

  end

end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
adeia-1.0.0 lib/adeia/exceptions.rb
adeia-0.15.4 lib/adeia/exceptions.rb
adeia-0.15.3 lib/adeia/exceptions.rb
adeia-0.15.2 lib/adeia/exceptions.rb
adeia-0.15.1 lib/adeia/exceptions.rb
adeia-0.15.0 lib/adeia/exceptions.rb
adeia-0.14.0 lib/adeia/exceptions.rb
adeia-0.13.1 lib/adeia/exceptions.rb
adeia-0.13.0 lib/adeia/exceptions.rb
adeia-0.12.0 lib/adeia/exceptions.rb
adeia-0.11.11 lib/adeia/exceptions.rb
adeia-0.11.10 lib/adeia/exceptions.rb
adeia-0.11.9 lib/adeia/exceptions.rb
adeia-0.11.8 lib/adeia/exceptions.rb
adeia-0.11.7 lib/adeia/exceptions.rb
adeia-0.11.6 lib/adeia/exceptions.rb
adeia-0.11.5 lib/adeia/exceptions.rb
adeia-0.11.4 lib/adeia/exceptions.rb
adeia-0.11.3 lib/adeia/exceptions.rb
adeia-0.11.2 lib/adeia/exceptions.rb