From 6ed2d4723df88213ff7ed78bd13eaeb890e97d86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?To=CF=80?= Date: Thu, 12 Oct 2023 12:01:28 +0200 Subject: [PATCH] remove throws IllegalStateException from method signature & update error message --- .../java/com/github/topi314/lavasearch/SearchManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/src/main/java/com/github/topi314/lavasearch/SearchManager.java b/main/src/main/java/com/github/topi314/lavasearch/SearchManager.java index abaf0d1..b5e684f 100644 --- a/main/src/main/java/com/github/topi314/lavasearch/SearchManager.java +++ b/main/src/main/java/com/github/topi314/lavasearch/SearchManager.java @@ -41,9 +41,9 @@ public void shutdown() { } @Nullable - public AudioSearchResult loadSearch(String query, Set types) throws IllegalStateException { + public AudioSearchResult loadSearch(String query, Set types) { if (this.searchManagers.isEmpty()){ - throw new IllegalStateException("No search source registered"); + throw new IllegalStateException("No search managers registered"); } for (var sourceManager : this.searchManagers) { var searchResults = sourceManager.loadSearch(query, types);