Sha256: 10ca22806f3bcde86c71583e21d355f5d8e7463d3471a2ea1b47155502db8686

Contents?: true

Size: 532 Bytes

Versions: 2

Compression:

Stored size: 532 Bytes

Contents

##
#
# Collection of errors used in this library
#
# Every time you want to raise one of these, you just go ahead and do:
#
# raise Tessera::ConfigNotSet, 'Your param'
#
module Tessera
  class Error < StandardError; end

  class ConfigNotSet < Error
    def initialize(param)
      msg = "Please check if you set #{param}, seems it is missing."
      super(msg)
    end
  end

  class TicketNotFound < Error
    def initialize(message, code)
      msg = "ErrorCode: #{code} \nMessage: #{message}"
      super(msg)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tessera-1.0.1 lib/tessera/utils/errors.rb
tessera-1.0.0 lib/tessera/utils/errors.rb