File tree Expand file tree Collapse file tree 3 files changed +2
-3
lines changed Expand file tree Collapse file tree 3 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ project(hnswlib
55
66include (GNUInstallDirs)
77include (CheckCXXCompilerFlag)
8- include (FetchContent)
98
109# These example/test targets catch exceptions, so exceptions should always be
1110# enabled building these files even if they are disabled in other targets.
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ class BruteforceSearch : public AlgorithmInterface<dist_t> {
7474 idx = search->second ;
7575 } else {
7676 if (cur_element_count >= maxelements_) {
77- HNSWLIB_THROW_RUNTIME_ERROR (" The number of elements exceeds the specified limit" );
77+ return Status (" The number of elements exceeds the specified limit" );
7878 }
7979 idx = cur_element_count;
8080 dict_external_to_internal[label] = idx;
Original file line number Diff line number Diff line change @@ -316,7 +316,7 @@ class AlgorithmInterface {
316316
317317 // Here searchKnn returns the result in the order of further first.
318318 auto status_or_result = searchKnnNoExceptions (query_data, k, isIdAllowed);
319- if (status_or_result.ok ()) {
319+ if (! status_or_result.ok ()) {
320320 return status_or_result.status ();
321321 }
322322 auto ret = std::move (status_or_result.value ());
You can’t perform that action at this time.
0 commit comments