mdbx-testing: добавление логирования С++ исключений в `extra/dupfix_multiple`.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2024-10-08 18:06:11 +03:00
parent ca2dbf0933
commit 57848b1d2d
1 changed files with 13 additions and 4 deletions

View File

@ -5,10 +5,7 @@
#include <array>
#include <iostream>
int main(int argc, const char *argv[]) {
(void)argc;
(void)argv;
int doit() {
mdbx::path db_filename = "test-dupfix-multiple";
mdbx::env_managed::remove(db_filename);
mdbx::env_managed env(db_filename, mdbx::env_managed::create_parameters(),
@ -285,3 +282,15 @@ int main(int argc, const char *argv[]) {
std::cout << "OK\n";
return EXIT_SUCCESS;
}
int main(int argc, const char *argv[]) {
(void)argc;
(void)argv;
try {
return doit();
} catch (const std::exception &ex) {
std::cerr << "Exception: " << ex.what() << "\n";
return EXIT_FAILURE;
}
}