1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-14 00:55:20 +02:00

Show better description to users when std::bad_alloc happens

This commit is contained in:
sfan5
2023-09-05 19:43:33 +02:00
parent 4ef93fe25f
commit 033128d8dc
4 changed files with 18 additions and 11 deletions

View File

@@ -277,9 +277,8 @@ bool ClientLauncher::run(GameStartData &start_data, const Settings &cmd_args)
#ifdef NDEBUG
catch (std::exception &e) {
std::string error_message = "Some exception: \"";
error_message += e.what();
error_message += "\"";
error_message = "Some exception: ";
error_message.append(debug_describe_exc(e));
errorstream << error_message << std::endl;
}
#endif