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') ⇒ void

Initializes a lyrics-not-found error.

Parameters:

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

    Error message.

  • exception_type (String) (defaults to: 'invalid_lyrics')

    Error type identifier.



90
91
92
93
94
# File 'lib/genius/api/errors.rb', line 90

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.



83
84
85
# File 'lib/genius/api/errors.rb', line 83

def exception_type
  @exception_type
end

#msgObject (readonly)

Returns the value of attribute msg.



83
84
85
# File 'lib/genius/api/errors.rb', line 83

def msg
  @msg
end