Sha256: 0451651b9a843ec3de10661876e093b4f8f63e06950286ab977b1f7f793b4b8e
Contents?: true
Size: 1.22 KB
Versions: 13
Compression:
Stored size: 1.22 KB
Contents
# frozen_string_literal: true module WCC::Contentful class SyncError < StandardError end # Raised when a constant under {WCC::Contentful::Model} does not match to a # content type in the configured Contentful space class ContentTypeNotFoundError < NameError end # Raised when an entry contains a circular reference and cannot be represented # as a flat tree. class CircularReferenceError < StandardError attr_reader :stack, :id def initialize(stack, id) @id = id @stack = stack.slice(stack.index(id)..stack.length) super('Circular reference detected!') end def message return super unless stack super + "\n " \ "#{stack.last} points to #{id} which is also it's ancestor\n " + stack.join('->') end end # Raised by {WCC::Contentful::ModelMethods#resolve Model#resolve} when attempting # to resolve an entry's links and that entry cannot be found in the space. class ResolveError < StandardError end class InitializationError < StandardError end # Raised by {WCC::Contentful::Middleware::Store::LocaleMiddleware} when the # backing store loads an entry for the wrong locale. class LocaleMismatchError < StandardError end end
Version data entries
13 entries across 13 versions & 1 rubygems