Sha256: 0ac84b6a07ee0cda2269f65a2501f6bfd0671ea34c72d9f5e552f6c941952a36

Contents?: true

Size: 598 Bytes

Versions: 7

Compression:

Stored size: 598 Bytes

Contents

# frozen_string_literal: true

module Cel
  class Error < StandardError; end

  class ParseError < Error; end

  class CheckError < Error; end

  class EvaluateError < Error; end

  class NoSuchFieldError < EvaluateError
    attr_reader :code

    def initialize(var, attrib)
      super("No such field: #{var}.#{attrib}")
      @code = :no_such_field
    end
  end

  class NoMatchingOverloadError < CheckError
    attr_reader :code

    def initialize(op)
      super("No matching overload: #{op}")
      @code = :no_matching_overload
    end
  end

  class BindingError < EvaluateError; end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
cel-0.2.3 lib/cel/errors.rb
cel-0.2.2 lib/cel/errors.rb
cel-0.2.1 lib/cel/errors.rb
cel-0.2.0 lib/cel/errors.rb
cel-0.1.2 lib/cel/errors.rb
cel-0.1.1 lib/cel/errors.rb
cel-0.1.0 lib/cel/errors.rb