Exception: Genius::Errors::LyricsNotFoundError

Inherits:
GeniusExceptionSuperClass show all
Defined in:
lib/genius/api/errors.rb

Overview

A LyricsNotFoundError object handles an exception where JSON with lyrics is not found.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg: "Lyrics not found in current session. Retrying...", exception_type: "invalid_lyrics") ⇒ String (frozen)

Parameters:

  • msg (String (frozen)) (defaults to: "Lyrics not found in current session. Retrying...")

    Exception message.

  • exception_type (String (frozen)) (defaults to: "invalid_lyrics")

    Exception type.



85
86
87
88
89
# File 'lib/genius/api/errors.rb', line 85

def initialize(msg: "Lyrics not found in current session. Retrying...", exception_type: "invalid_lyrics")
  @msg = msg
  @exception_type = exception_type
  super(msg)
end

Instance Attribute Details

#exception_typeObject (readonly)

Returns the value of attribute exception_type.



80
81
82
# File 'lib/genius/api/errors.rb', line 80

def exception_type
  @exception_type
end

#msgObject (readonly)

Returns the value of attribute msg.



80
81
82
# File 'lib/genius/api/errors.rb', line 80

def msg
  @msg
end