File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -126,15 +126,18 @@ using DynamicVamanaIndexLeanVecImplManager =
126126
127127// DynamicVamanaIndex interface implementation
128128Status DynamicVamanaIndex::check_storage_kind (StorageKind storage_kind) noexcept {
129- return runtime_error_wrapper ([&] {
130- return storage::is_supported_storage_kind (storage_kind)
131- ? Status_Ok
132- : Status (
133- ErrorCode::INVALID_ARGUMENT,
134- " The specified storage kind is not compatible with the "
135- " DynamicVamanaIndex"
136- );
129+ bool supported = false ;
130+ auto status = runtime_error_wrapper ([&] {
131+ supported = storage::is_supported_storage_kind (storage_kind);
137132 });
133+ if (status != Status_Ok) {
134+ return status;
135+ }
136+ return supported ? Status_Ok
137+ : Status (
138+ ErrorCode::NOT_IMPLEMENTED,
139+ " Requested storage kind is not supported by CPU"
140+ );
138141}
139142
140143Status DynamicVamanaIndex::build (
You can’t perform that action at this time.
0 commit comments