Sha256: ad8b01d3139ab55f17aaeaaaaec7c1caa47bfcf5e75704eabce84c4e9dde0f46

Contents?: true

Size: 637 Bytes

Versions: 6

Compression:

Stored size: 637 Bytes

Contents

module Tangle
  #
  # LoopError is raised when a looped edge is disallowed.
  #
  class LoopError < RuntimeError
    def initialize(reason = 'loops not allowed', *)
      super
    end
  end

  # MultiEdgeError is raised when multiple edges between a single pair of
  # vertices is disallowed.
  #
  class MultiEdgeError < RuntimeError
    def initialize(reason = 'multiedges not allowed', *)
      super
    end
  end

  # GraphError is raised when graph elements in an operation belong to
  # different graphs.
  #
  class GraphError < RuntimeError
    def initialize(reason = 'not in the same graph', *)
      super
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tangle-0.4.2 lib/tangle/errors.rb
tangle-0.4.0 lib/tangle/errors.rb
tangle-0.3.1 lib/tangle/errors.rb
tangle-0.3.0 lib/tangle/errors.rb
tangle-0.2.1 lib/tangle/errors.rb
tangle-0.2.0 lib/tangle/errors.rb