diff options
Diffstat (limited to 'cpp/src/IcePatch2/Server.cpp')
-rw-r--r-- | cpp/src/IcePatch2/Server.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/cpp/src/IcePatch2/Server.cpp b/cpp/src/IcePatch2/Server.cpp index a3e29e83555..224137c419b 100644 --- a/cpp/src/IcePatch2/Server.cpp +++ b/cpp/src/IcePatch2/Server.cpp @@ -107,7 +107,7 @@ IcePatch2::PatcherService::start(int argc, char* argv[], int& status) string cwd; if(IceUtilInternal::getcwd(cwd) != 0) { - throw "cannot get the current directory:\n" + IceUtilInternal::lastErrorToString(); + throw runtime_error("cannot get the current directory:\n" + IceUtilInternal::lastErrorToString()); } dataDir = cwd + '/' + dataDir; @@ -115,14 +115,9 @@ IcePatch2::PatcherService::start(int argc, char* argv[], int& status) loadFileInfoSeq(dataDir, infoSeq); } - catch(const string& ex) + catch(const exception& ex) { - error(ex); - return false; - } - catch(const char* ex) - { - error(ex); + error(ex.what()); return false; } |