Sha256: d1245bd9c851453db2c5111282ab506741b2801018641ac5b913bb8c0d7d1218

Contents?: true

Size: 847 Bytes

Versions: 6

Compression:

Stored size: 847 Bytes

Contents

# frozen_string_literal: true

module Hanami
  class Assets
    # Base error for Hanami::Assets.
    #
    # @api public
    # @since 0.1.0
    class Error < ::StandardError
    end

    # Error returned when the assets manifest file is missing.
    #
    # @api public
    # @since 2.1.0
    class ManifestMissingError < Error
      def initialize(manifest_path)
        super(<<~TEXT)
          Missing manifest file at #{manifest_path.inspect}

          Have you run `hanami assets compile` or `hanami assets watch`?
        TEXT
      end
    end

    # Error raised when no asset can be found for a source path.
    #
    # @api public
    # @since 2.1.0
    class AssetMissingError < Error
      def initialize(source_path)
        super(<<~TEXT)
          No asset found for #{source_path.inspect}
        TEXT
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
hanami-assets-2.2.0 lib/hanami/assets/errors.rb
hanami-assets-2.2.0.rc1 lib/hanami/assets/errors.rb
hanami-assets-2.2.0.beta2 lib/hanami/assets/errors.rb
hanami-assets-2.2.0.beta1 lib/hanami/assets/errors.rb
hanami-assets-2.1.0 lib/hanami/assets/errors.rb
hanami-assets-2.1.0.rc3 lib/hanami/assets/errors.rb