Exception: Parse::Embeddings::VideoSource::InvalidVideoType

Inherits:
Error
  • Object
show all
Defined in:
lib/parse/embeddings/video_source.rb

Overview

Raised when bytes fail verification — unknown magic, or a sniffed type outside the allowlist. Carries a :reason tag (:empty, :unknown_magic, :type_not_allowed) matching ImageFetch::InvalidImageType's convention.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reason, message) ⇒ InvalidVideoType

Returns a new instance of InvalidVideoType.



34
35
36
37
# File 'lib/parse/embeddings/video_source.rb', line 34

def initialize(reason, message)
  @reason = reason
  super(message)
end

Instance Attribute Details

#reasonSymbol (readonly)

Returns failure-mode tag.

Returns:

  • (Symbol)

    failure-mode tag.



33
34
35
# File 'lib/parse/embeddings/video_source.rb', line 33

def reason
  @reason
end