Print function name in error messages.

This commit is contained in:
tastytea 2019-05-16 00:04:49 +02:00
parent c17b7e89f1
commit df69efbbb7
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
3 changed files with 5 additions and 5 deletions

View File

@ -166,7 +166,7 @@ const options parse_options(const int argc, const char *argv[])
}
catch (const std::exception &e)
{
cerr << "Error: " << e.what() << endl;
cerr << "Error in " << __func__ << ": " << e.what() << endl;
return options(1);
}

View File

@ -51,7 +51,7 @@ Database::Database()
}
catch (std::exception &e)
{
cerr << "Error: " << e.what() << endl;
cerr << "Error in " << __func__ << ": " << e.what() << endl;
}
}
@ -86,6 +86,6 @@ void Database::store(const string &uri, const string &archive_uri,
}
catch (std::exception &e)
{
cerr << "Error: " << e.what() << endl;
cerr << "Error in " << __func__ << ": " << e.what() << endl;
}
}

View File

@ -74,7 +74,7 @@ const html_extract URL::get()
}
catch (const std::exception &e)
{
cerr << "Error: " << e.what() << endl;
cerr << "Error in " << __func__ << ": " << e.what() << endl;
}
return { "", "", "" };
@ -432,7 +432,7 @@ const string URL::archive()
}
catch (const std::exception &e)
{
cerr << "Error: " << e.what() << endl;
cerr << "Error in " << __func__ << ": " << e.what() << endl;
}
return "";