diff options
| author | Imayhaveborkedit <[email protected]> | 2019-11-20 00:34:23 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-11-26 05:16:53 -0500 |
| commit | 839afce17890a03c0718d5ad76069b641da54034 (patch) | |
| tree | 7b073b8e6cbccbebdc9700187ff2d2b5462b9c3f /discord/voice_client.py | |
| parent | Add new audit log entry types. Fix issue with unknown entry types (diff) | |
| download | discord.py-839afce17890a03c0718d5ad76069b641da54034.tar.xz discord.py-839afce17890a03c0718d5ad76069b641da54034.zip | |
Print exception tracebacks in voice threads
Errors occurring within `AudioSource.read()` and `after()` functions will now display their tracebacks as if they were unhandled exceptions.
Diffstat (limited to 'discord/voice_client.py')
| -rw-r--r-- | discord/voice_client.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/discord/voice_client.py b/discord/voice_client.py index 63975743..f3729c9e 100644 --- a/discord/voice_client.py +++ b/discord/voice_client.py @@ -338,7 +338,8 @@ class VoiceClient: or an error occurred. If an error happens while the audio player is running, the exception is - caught and the audio player is then stopped. + caught and the audio player is then stopped. If no after callback is + passed, any caught exception will be displayed as if it were raised. Parameters ----------- @@ -346,9 +347,8 @@ class VoiceClient: The audio source we're reading from. after: Callable[[:class:`Exception`], Any] The finalizer that is called after the stream is exhausted. - All exceptions it throws are silently discarded. This function - must have a single parameter, ``error``, that denotes an - optional exception that was raised during playing. + This function must have a single parameter, ``error``, that + denotes an optional exception that was raised during playing. Raises ------- |