Files
EeveeSpotifyReborn/Sources/EeveeSpotify/Lyrics/Models/LyricsError.swift
T
2025-06-04 23:26:53 +03:00

32 lines
877 B
Swift

import Foundation
enum LyricsError: Error, CustomStringConvertible {
case noCurrentTrack
case musixmatchRestricted
case invalidMusixmatchToken
case decodingError
case noSuchSong
case unknownError
case invalidSource
// swift 5.8 compatible
var description: String {
switch self {
case .noSuchSong:
return "no_such_song".localized
case .musixmatchRestricted:
return "musixmatch_restricted".localized
case .invalidMusixmatchToken:
return "invalid_musixmatch_token".localized
case .decodingError:
return "decoding_error".localized
case .noCurrentTrack:
return "no_current_track".localized
case .unknownError:
return "unknown_error".localized
case .invalidSource:
return ""
}
}
}