debug(NFLmusic): 优化异常打印信息
- 在加载歌词失败时,添加"lyric: "前缀以明确错误来源 - 在外部循环捕获异常时,添加更具体的错误信息前缀
This commit is contained in:
@ -1028,7 +1028,7 @@ def tick():
|
|||||||
try:
|
try:
|
||||||
lyric = lyrics.load_lyrics(f"{path}/{music_file_without_endswith}.lrc")
|
lyric = lyrics.load_lyrics(f"{path}/{music_file_without_endswith}.lrc")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print("lyric: ", e)
|
||||||
lyric = {}
|
lyric = {}
|
||||||
music_player.set_format_of_time(
|
music_player.set_format_of_time(
|
||||||
lang.get(la, "ui.playing.text.time_format",
|
lang.get(la, "ui.playing.text.time_format",
|
||||||
@ -1050,7 +1050,7 @@ def tick():
|
|||||||
try:
|
try:
|
||||||
lyric = lyrics.load_lyrics(f"{path}/{music_file_without_endswith}.lrc")
|
lyric = lyrics.load_lyrics(f"{path}/{music_file_without_endswith}.lrc")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print("lyric: ", e)
|
||||||
lyric = {}
|
lyric = {}
|
||||||
except IndexError:
|
except IndexError:
|
||||||
music_file_name = music_dir[0]
|
music_file_name = music_dir[0]
|
||||||
@ -1065,7 +1065,7 @@ def tick():
|
|||||||
{"_music_": music_file_without_endswith}))
|
{"_music_": music_file_without_endswith}))
|
||||||
playmusic(music_playing)
|
playmusic(music_playing)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print("External loop error: ", e)
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
playing_progress.state(["!disabled"])
|
playing_progress.state(["!disabled"])
|
||||||
|
Reference in New Issue
Block a user