From 341a8b8b5ce0e3794aeb43aba567821dd139f405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Thu, 13 Jun 2024 11:05:09 +0300 Subject: [PATCH] =?UTF-8?q?mdbx++:=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B3=D0=B5=D0=BD=D0=B5=D1=80?= =?UTF-8?q?=D0=B0=D1=86=D0=B8=D0=B8=20=D0=B8=D1=81=D0=BA=D0=BB=D1=8E=D1=87?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20`key=5Fexists`=20(backport).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Из-за совершенной при размножении кода ошибки, вместо отдельного исключения `mdbx::key_exists` при ошибке `MDBX_KEYEXIST` вбрасывалось исключении более общего/генерализированного типа `mdbx::exception`. --- src/mdbx.c++ | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mdbx.c++ b/src/mdbx.c++ index 9b09c05a..8b34a378 100644 --- a/src/mdbx.c++ +++ b/src/mdbx.c++ @@ -410,6 +410,7 @@ __cold void error::throw_exception() const { CASE_EXCEPTION(incompatible_operation, MDBX_INCOMPATIBLE); CASE_EXCEPTION(internal_page_full, MDBX_PAGE_FULL); CASE_EXCEPTION(internal_problem, MDBX_PROBLEM); + CASE_EXCEPTION(key_exists, MDBX_KEYEXIST); CASE_EXCEPTION(key_mismatch, MDBX_EKEYMISMATCH); CASE_EXCEPTION(max_maps_reached, MDBX_DBS_FULL); CASE_EXCEPTION(max_readers_reached, MDBX_READERS_FULL);