Made code more nice to look at (to me)

This commit is contained in:
NaifBanana 2025-11-10 00:42:31 -06:00
parent 17624e9e3c
commit 85875d8130

View File

@ -87,10 +87,9 @@ protected:
std::string filename=""
) noexcept : ErrorBase(code, msg, line, filename) {
std::string what_msg(trace.what());
std::string::size_type newline_pos = what_msg.find("\n");
while(newline_pos != std::string::npos) {
std::string::size_type newline_pos=-1;
while((newline_pos=what_msg.find("\n", newline_pos+1))!= std::string::npos) {
what_msg.replace(newline_pos, 1, "\n ");
newline_pos = what_msg.find("\n", newline_pos+1);
}
_msg += "\n Trace: " + what_msg;
}