Sha256: 2adf3c1cb6f9e9fe44d01260c67b9ba22e59a675f3290d088c5b6929202d3b12

Contents?: true

Size: 817 Bytes

Versions: 2

Compression:

Stored size: 817 Bytes

Contents

module Trax
  module Model
    module Errors
      class Base < StandardError
        def initialize(*args)
          message = (self.class::MESSAGE + args).join("\n")
          super(message)
        end
      end

      class InvalidPrefix < Trax::Model::Errors::Base
        MESSAGE = [
          "UUID prefix must be 2 characters long",
          "and be 0-9 or a-f",
          "for hexadecimal id compatibility"
        ]
      end

      class DuplicatePrefixRegistered < Trax::Model::Errors::Base
        MESSAGE = [
          "UUID prefix must be unique, the",
          "following prefix was already registered"
        ]
      end

      class STIAttributeNotFound < ::Trax::Model::Errors::Base
        MESSAGE = [
          "STI Attribute was not found for attribute"
        ]
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
trax_model-0.0.91 lib/trax/model/errors.rb
trax_model-0.0.9 lib/trax/model/errors.rb