Skip to content

Commit

Permalink
refactor: for full error info
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmaialva33 committed Oct 28, 2024
1 parent c15976a commit 248be1a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions WinxMusic/plugins/play/play.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ async def play_commnd(
err = e
else:
err = _["general_3"].format(ex_type)
LOGGER(__name__).error(f"{ex_type} {e}")
LOGGER(__name__).error("An error occurred", exc_info=True)
return await mystic.edit_text(err)
return await mystic.delete()
return
Expand Down Expand Up @@ -161,7 +161,7 @@ async def play_commnd(
if ex_type == "AssistantErr":
err = e
else:
LOGGER(__name__).error(f"{ex_type} {e}")
LOGGER(__name__).error("An error occurred", exc_info=True)
err = _["general_3"].format(ex_type)
return await mystic.edit_text(err)
return await mystic.delete()
Expand Down Expand Up @@ -290,7 +290,7 @@ async def play_commnd(
file_path, details = await Saavn.download(url)
except Exception as e:
ex_type = type(e).__name__
LOGGER(__name__).error(f"{ex_type} {e}")
LOGGER(__name__).error("An error occurred", exc_info=True)
return await mystic.edit_text(_["play_3"])
duration_sec = details["duration_sec"]
streamtype = "saavn_track"
Expand All @@ -310,7 +310,7 @@ async def play_commnd(
streamtype = "saavn_playlist"
except Exception as e:
ex_type = type(e).__name__
LOGGER(__name__).error(f"{ex_type} {e}")
LOGGER(__name__).error("An error occurred", exc_info=True)
return await mystic.edit_text(_["play_3"])

if len(details) == 0:
Expand All @@ -333,7 +333,7 @@ async def play_commnd(
err = e
else:
err = _["general_3"].format(ex_type)
LOGGER(__name__).error(f"{ex_type} {e}")
LOGGER(__name__).error("An error occurred", exc_info=True)
return await mystic.edit_text(err)
return await mystic.delete()

Expand Down Expand Up @@ -367,7 +367,7 @@ async def play_commnd(
if ex_type == "AssistantErr":
err = e
else:
LOGGER(__name__).error(f"{ex_type} {e}")
LOGGER(__name__).error("An error occurred", exc_info=True)
err = _["general_3"].format(ex_type)
return await mystic.edit_text(err)
return await mystic.delete()
Expand All @@ -394,7 +394,7 @@ async def play_commnd(
if ex_type == "AssistantErr":
err = e
else:
LOGGER(__name__).error(f"{ex_type} {e}")
LOGGER(__name__).error("An error occurred", exc_info=True)
err = _["general_3"].format(ex_type)
return await mystic.edit_text(err)
return await play_logs(message, streamtype="M3u8 or Index Link")
Expand Down Expand Up @@ -456,7 +456,7 @@ async def play_commnd(
if ex_type == "AssistantErr":
err = e
else:
LOGGER(__name__).error(f"{ex_type} {e}")
LOGGER(__name__).error("An error occurred", exc_info=True)

err = _["general_3"].format(ex_type)
return await mystic.edit_text(err)
Expand Down

0 comments on commit 248be1a

Please sign in to comment.