blockchain_export: error out nicely on exceptions

This commit is contained in:
moneromooo-monero 2017-03-05 19:24:47 +00:00
parent e66866c1fc
commit 87d57d9c59
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3

View file

@ -57,6 +57,8 @@ std::string join_set_strings(const std::unordered_set<std::string>& db_types_all
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
TRY_ENTRY();
epee::string_tools::set_module_name_and_folder(argv[0]); epee::string_tools::set_module_name_and_folder(argv[0]);
std::string default_db_type = "lmdb"; std::string default_db_type = "lmdb";
@ -226,4 +228,7 @@ int main(int argc, char* argv[])
} }
CHECK_AND_ASSERT_MES(r, false, "Failed to export blockchain raw data"); CHECK_AND_ASSERT_MES(r, false, "Failed to export blockchain raw data");
LOG_PRINT_L0("Blockchain raw data exported OK"); LOG_PRINT_L0("Blockchain raw data exported OK");
return 0;
CATCH_ENTRY("Export error", 1);
} }