better exceptions
This commit is contained in:
parent
e8c9f91a7c
commit
da8a5dbcee
@ -210,7 +210,8 @@ class MainService:
|
|||||||
async with self.lock_for(guild):
|
async with self.lock_for(guild):
|
||||||
await self._restore_vc(guild, vccid, vc_is_paused)
|
await self._restore_vc(guild, vccid, vc_is_paused)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f'vc {vcgid} {vccid} {vc_is_paused} failed', e)
|
print(f'vc {vcgid} {vccid} {vc_is_paused} failed')
|
||||||
|
traceback.print_exc()
|
||||||
else:
|
else:
|
||||||
print(f'vc restored {vcgid} {vccid}')
|
print(f'vc restored {vcgid} {vccid}')
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import random
|
import random
|
||||||
|
import traceback
|
||||||
from collections import deque
|
from collections import deque
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
from typing import MutableSequence
|
from typing import MutableSequence
|
||||||
@ -48,6 +49,7 @@ class QueueAudio(discord.AudioSource):
|
|||||||
raise
|
raise
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print('queue respawn failed', e)
|
print('queue respawn failed', e)
|
||||||
|
traceback.print_exc()
|
||||||
return respawned
|
return respawned
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -189,9 +191,7 @@ class QueueAudio(discord.AudioSource):
|
|||||||
def shuffle(self) -> None:
|
def shuffle(self) -> None:
|
||||||
try:
|
try:
|
||||||
random.shuffle(ForwardView(self.queue))
|
random.shuffle(ForwardView(self.queue))
|
||||||
except:
|
finally:
|
||||||
from traceback import print_exc
|
|
||||||
print_exc()
|
|
||||||
self.update_sources()
|
self.update_sources()
|
||||||
|
|
||||||
def branch(self, effects: str | None) -> None:
|
def branch(self, effects: str | None) -> None:
|
||||||
|
Loading…
Reference in New Issue
Block a user