Sha256: 047f133aa7835682c9528d5952912cea4a96c8b55913ca05955e520ccefd59d4

Contents?: true

Size: 816 Bytes

Versions: 13

Compression:

Stored size: 816 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

  # CyclicError is raised when an edge cycle is disallowed.
  #
  class CyclicError < RuntimeError
    def initialize(reason = 'cycles not allowed', *)
      super
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
tangle-0.9.0 lib/tangle/errors.rb
tangle-0.8.2 lib/tangle/errors.rb
tangle-0.8.1 lib/tangle/errors.rb
tangle-0.8.0 lib/tangle/errors.rb
tangle-0.7.0 lib/tangle/errors.rb
tangle-0.6.5 lib/tangle/errors.rb
tangle-0.6.4 lib/tangle/errors.rb
tangle-0.6.3 lib/tangle/errors.rb
tangle-0.6.2 lib/tangle/errors.rb
tangle-0.6.1 lib/tangle/errors.rb
tangle-0.6.0 lib/tangle/errors.rb
tangle-0.5.1 lib/tangle/errors.rb
tangle-0.5.0 lib/tangle/errors.rb