From c9c133bb4c5a48a6cee0de49b65219b72842e999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?To=CF=80?= Date: Wed, 18 Oct 2023 00:14:21 +0200 Subject: [PATCH] log error when mirroring track and exception happens (#129) # Conflicts: # main/src/main/java/com/github/topi314/lavasrc/mirror/DefaultMirroringAudioTrackResolver.java --- .../lavasrc/mirror/DefaultMirroringAudioTrackResolver.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main/src/main/java/com/github/topi314/lavasrc/mirror/DefaultMirroringAudioTrackResolver.java b/main/src/main/java/com/github/topi314/lavasrc/mirror/DefaultMirroringAudioTrackResolver.java index 61e7f413..01fb7da4 100644 --- a/main/src/main/java/com/github/topi314/lavasrc/mirror/DefaultMirroringAudioTrackResolver.java +++ b/main/src/main/java/com/github/topi314/lavasrc/mirror/DefaultMirroringAudioTrackResolver.java @@ -46,7 +46,12 @@ public AudioItem apply(MirroringAudioTrack mirroringAudioTrack) { } provider = provider.replace(MirroringAudioSourceManager.QUERY_PATTERN, getTrackTitle(mirroringAudioTrack)); - track = mirroringAudioTrack.loadItem(provider); + try { + track = mirroringAudioTrack.loadItem(provider); + } + catch (Exception e) { + log.error("Failed to load track from provider \"{}\"!", provider, e); + } if (track != AudioReference.NO_TRACK) { break; }