From 6a19bbee7d7380167844296221130bf7421e8248 Mon Sep 17 00:00:00 2001 From: ehofman Date: Fri, 19 Dec 2003 17:44:30 +0000 Subject: [PATCH] Melchior FRANZ: 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. --- simgear/structure/exception.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/simgear/structure/exception.cxx b/simgear/structure/exception.cxx index d7c83b08..af9be516 100644 --- a/simgear/structure/exception.cxx +++ b/simgear/structure/exception.cxx @@ -229,8 +229,11 @@ const string 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; } -- 2.39.5