There are constructors for sg_io_exception that don't initialize the
location. In this case getFormattedMessage does still output an extra
line with " at" followed by ... nothing. Looks silly.
sg_io_exception::getFormattedMessage () const
{
string ret = getMessage();
- ret += "\n at ";
- ret += getLocation().asString();
+ string loc = getLocation().asString();
+ if (loc.length()) {
+ ret += "\n at ";
+ ret += loc;
+ }
return ret;
}