Skip to content
This repository was archived by the owner on Jan 31, 2022. It is now read-only.

Commit 7282e43

Browse files
author
Clément Le Provost
committed
Remove exception from signature of asynchronous public methods
1 parent f6fe596 commit 7282e43

File tree

1 file changed

+3
-3
lines changed
  • algoliasearch/src/main/java/com/algolia/search/saas

1 file changed

+3
-3
lines changed

algoliasearch/src/main/java/com/algolia/search/saas/Index.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ protected Request multipleQueriesAsync(@NonNull List<Query> queries, @NonNull Co
189189
* @param handler A Completion handler that will be notified of the request's outcome.
190190
* @return A cancellable request.
191191
*/
192-
public Request searchForFacetValues(@NonNull String facetName, @NonNull String text, @NonNull final CompletionHandler handler) throws AlgoliaException {
192+
public Request searchForFacetValues(@NonNull String facetName, @NonNull String text, @NonNull final CompletionHandler handler) {
193193
return searchForFacetValues(facetName, text, null, handler);
194194
}
195195

@@ -202,7 +202,7 @@ public Request searchForFacetValues(@NonNull String facetName, @NonNull String t
202202
* @param handler A Completion handler that will be notified of the request's outcome.
203203
* @return A cancellable request.
204204
*/
205-
public Request searchForFacetValues(@NonNull String facetName, @NonNull String facetText, @Nullable Query query, @NonNull final CompletionHandler handler) throws AlgoliaException {
205+
public Request searchForFacetValues(@NonNull String facetName, @NonNull String facetText, @Nullable Query query, @NonNull final CompletionHandler handler) {
206206
try {
207207
final String path = "/1/indexes/" + getEncodedIndexName() + "/facets/" + URLEncoder.encode(facetName, "UTF-8") + "/query";
208208
final Query params = (query != null ? new Query(query) : new Query());
@@ -218,7 +218,7 @@ protected JSONObject run() throws AlgoliaException {
218218
}
219219
}.start();
220220
} catch (UnsupportedEncodingException | JSONException e) {
221-
throw new AlgoliaException(e.getMessage());
221+
throw new RuntimeException(e); // should never happen
222222
}
223223
}
224224

0 commit comments

Comments
 (0)