Exception: Genius::Errors::LyricsNotFoundError

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

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

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.

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


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_type ⇒ String (readonly)

Returns the value of attribute exception_type.

Returns:



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

def exception_type
  @exception_type
end

#msg ⇒ String (readonly)

Returns the value of attribute msg.

Returns:



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

def msg
  @msg
end