mdbx-testing: добавление логирования С++ исключений в `extra/dupfix_multiple`.
This commit is contained in:
parent
ca2dbf0933
commit
57848b1d2d
|
@ -5,10 +5,7 @@
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
int main(int argc, const char *argv[]) {
|
int doit() {
|
||||||
(void)argc;
|
|
||||||
(void)argv;
|
|
||||||
|
|
||||||
mdbx::path db_filename = "test-dupfix-multiple";
|
mdbx::path db_filename = "test-dupfix-multiple";
|
||||||
mdbx::env_managed::remove(db_filename);
|
mdbx::env_managed::remove(db_filename);
|
||||||
mdbx::env_managed env(db_filename, mdbx::env_managed::create_parameters(),
|
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";
|
std::cout << "OK\n";
|
||||||
return EXIT_SUCCESS;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue