From 31e028b236343fef0acceff19ffc080b033d1b2a Mon Sep 17 00:00:00 2001 From: pauldb09 <70904183+pauldb09@users.noreply.github.com> Date: Sun, 5 Mar 2023 08:11:17 +0100 Subject: [PATCH] fix --- .../src/main/java/dev/arbjerg/lavalink/protocol/v3/util.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/protocol/src/main/java/dev/arbjerg/lavalink/protocol/v3/util.kt b/protocol/src/main/java/dev/arbjerg/lavalink/protocol/v3/util.kt index 551372cfb..9bc738c1b 100644 --- a/protocol/src/main/java/dev/arbjerg/lavalink/protocol/v3/util.kt +++ b/protocol/src/main/java/dev/arbjerg/lavalink/protocol/v3/util.kt @@ -14,9 +14,10 @@ fun decodeTrack(audioPlayerManager: AudioPlayerManager, message: String): AudioT val bais = ByteArrayInputStream(Base64.decodeBase64(message)) return try { audioPlayerManager.decodeTrack(MessageInput(bais)).decodedTrack + ?: throw TrackDecodingException("Failed to decode track") } catch (e: IllegalStateException) { // Handle the exception here - + throw TrackDecodingException("Failed to decode track due to an IllegalStateException") } } fun encodeTrack(audioPlayerManager: AudioPlayerManager, track: AudioTrack): String {