Sha256: bebaf6e81f6cf56a8b48f9efb78f42acf03e61ed6ffb8d6c4dc949012abf3a90

Contents?: true

Size: 698 Bytes

Versions: 1

Compression:

Stored size: 698 Bytes

Contents

require 'sparkle_formation'

class SparkleFormation

  # SparkleFormation specific errors
  class Error < StandardError

    # File not found error
    class NotFound < KeyError
      attr_reader :name

      def initialize(*args)
        opts = args.detect{|o| o.is_a?(Hash)}
        args.delete(opts) if opts
        super(args)
        @name = opts[:name] if opts
      end

      # Pack related items
      class Dynamic < NotFound; end
      class Component < NotFound; end
      class Registry < NotFound; end
      class Template < NotFound; end

      # Template internals
      class Resource < NotFound; end

    end

    # Deprecation error
    class Deprecated < Error; end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sparkle_formation-2.0.0 lib/sparkle_formation/error.rb