1
0
Fork 0
forked from lthn/blockchain

wallet & coretests: minor error-logging improvements

This commit is contained in:
sowle 2022-05-01 21:03:27 +02:00
parent a51057753c
commit 2b1d890b74
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC
2 changed files with 5 additions and 2 deletions

View file

@ -70,7 +70,10 @@ namespace tools
std::string to_string() const
{
std::ostringstream ss;
ss << m_loc << ':' << typeid(*this).name() << "[" << m_error_code << "]: " << Base::what();
ss << m_loc << ':' << typeid(*this).name();
if (!m_error_code.empty())
ss << "[" << m_error_code << "]";
ss << ": " << Base::what();
return ss.str();
}

View file

@ -106,7 +106,7 @@ bool generate_and_play(const char* const genclass_name)
std::vector<test_event_entry> events;
bool generated = false;
bool result = true;
std::cout << concolor::bright_white << "#TEST# " << genclass_name << concolor::normal << std::endl;
std::cout << ENDL << concolor::bright_white << "#TEST# " << genclass_name << concolor::normal << ENDL << ENDL;
LOG_PRINT2("get_object_blobsize.log", "#TEST# " << genclass_name, LOG_LEVEL_3);
if (!clean_data_directory())