Sha256: 3e8d6df38fdc95c3c7b18680bc41cb7d35943cfaeb7146af8e485f1379d88b8d

Contents?: true

Size: 538 Bytes

Versions: 4

Compression:

Stored size: 538 Bytes

Contents


module Lite3
  # Exception class for errors specific `Lite3::DBM`.
  class Error < StandardError; end

  # Exception class for internal errors; if you get one of these,
  # either my code or your code is incorrect.
  class InternalError < Error; end

  private

  module ErrUtil
    # Error check: if block evaluates to false, raise a Lite3::DBM::Error
    # with the given message.
    def check(message, &block)
      return if block && block.call
      raise InternalError.new(message)
    end
  end

  private_constant :ErrUtil
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
dbmlite3_jruby-2.0.1 lib/internal_lite3/error.rb
dbmlite3-2.0.1 lib/internal_lite3/error.rb
dbmlite3_jruby-2.0.0 lib/internal_lite3/error.rb
dbmlite3-2.0.0 lib/internal_lite3/error.rb