Sha256: 15f00b5760259c6ea5b18b7c5e56eba1f5b1c65d48d065e695872d325ca8a0d6

Contents?: true

Size: 937 Bytes

Versions: 28

Compression:

Stored size: 937 Bytes

Contents

# Copyright (c) 2015 Sqreen. All Rights Reserved.
# Please refer to our terms for more information: https://www.sqreen.io/terms.html

require 'sqreen/log'

module Sqreen
  # Base exeception class for sqreen
  class Exception < ::StandardError
    def initialize(msg = nil, *args)
      super(msg, *args)
      log_message msg if msg
    end

    def log_message(msg)
      Sqreen.log.error(msg)
    end
  end

  # When the token is not found
  class TokenNotFoundException < Exception
  end

  # When the token is invalid
  class TokenInvalidException < Exception
  end

  # This exception name is particularly important since it is often seen by
  # Sqreen users when watching their logs. It should not raise any concern to
  # them.
  class AttackBlocked < Exception
    def log_message(msg)
      Sqreen.log.warn(msg)
    end
  end

  class NotImplementedYet < Exception
  end

  class InvalidSignatureException < Exception
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
sqreen-1.15.8-java lib/sqreen/exception.rb
sqreen-1.15.8 lib/sqreen/exception.rb
sqreen-1.15.8.beta2-java lib/sqreen/exception.rb
sqreen-1.15.8.beta2 lib/sqreen/exception.rb
sqreen-1.15.8.beta1-java lib/sqreen/exception.rb
sqreen-1.15.8.beta1 lib/sqreen/exception.rb
sqreen-1.15.7-java lib/sqreen/exception.rb
sqreen-1.15.7 lib/sqreen/exception.rb
sqreen-1.15.7.beta1-java lib/sqreen/exception.rb
sqreen-1.15.7.beta1 lib/sqreen/exception.rb
sqreen-1.15.6-java lib/sqreen/exception.rb
sqreen-1.15.6 lib/sqreen/exception.rb
sqreen-1.15.5-java lib/sqreen/exception.rb
sqreen-1.15.5 lib/sqreen/exception.rb
sqreen-1.15.4 lib/sqreen/exception.rb
sqreen-1.15.3 lib/sqreen/exception.rb
sqreen-1.15.3.beta2 lib/sqreen/exception.rb
sqreen-1.15.3.beta1 lib/sqreen/exception.rb
sqreen-1.15.2 lib/sqreen/exception.rb
sqreen-1.15.1 lib/sqreen/exception.rb