Move location to the end of what()

This commit is contained in:
Peter Dimov
2021-09-15 07:58:24 +03:00
parent cd98f4edd7
commit f21035f8af

View File

@@ -43,8 +43,12 @@ private:
r += ": "; r += ": ";
} }
r += ec.message();
if( ec.has_location() ) if( ec.has_location() )
{ {
r += " [";
boost::source_location loc = ec.location(); boost::source_location loc = ec.location();
r += loc.file_name(); r += loc.file_name();
@@ -63,11 +67,9 @@ private:
r += "\': "; r += "\': ";
r += ec.to_string(); r += ec.to_string();
r += ": "; r += "]";
} }
r += ec.message();
return r; return r;
} }