diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-06 17:50:26 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-06 17:50:26 +0100 |
| commit | b1336faa48bee2cdb7ef0486a5a4faa5c74f4fa7 (patch) | |
| tree | a86ee9bbd505b68d57a189418df152d48a1e852d /src/Daemon/MiddleWare.cpp | |
| parent | 3a62ede25114452938acb8e1a67006633b139efc (diff) | |
| download | abrt-b1336faa48bee2cdb7ef0486a5a4faa5c74f4fa7.tar.gz abrt-b1336faa48bee2cdb7ef0486a5a4faa5c74f4fa7.tar.xz abrt-b1336faa48bee2cdb7ef0486a5a4faa5c74f4fa7.zip | |
make exception handling lighter
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src/Daemon/MiddleWare.cpp')
| -rw-r--r-- | src/Daemon/MiddleWare.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp index abf13814..3f26ab09 100644 --- a/src/Daemon/MiddleWare.cpp +++ b/src/Daemon/MiddleWare.cpp @@ -236,7 +236,7 @@ mw_result_t CreateCrashReport(const char *pUUID, } catch (CABRTException& e) { - warn_client("CreateCrashReport(): " + e.what()); + warn_client(e.what()); if (e.type() == EXCEP_DD_OPEN) { return MW_ERROR; @@ -266,8 +266,8 @@ void RunAction(const char *pActionDir, } catch (CABRTException& e) { - warn_client(ssprintf("RunAction(): %s", e.what().c_str())); - update_client(ssprintf("Execution of '%s' was not successful: %s", pPluginName, e.what().c_str())); + warn_client(ssprintf("RunAction(): %s", e.what())); + update_client(ssprintf("Execution of '%s' was not successful: %s", pPluginName, e.what())); } } @@ -295,8 +295,8 @@ void RunActionsAndReporters(const char *pDebugDumpDir) } catch (CABRTException& e) { - warn_client("RunActionsAndReporters(): " + e.what()); - update_client("Activation of plugin '" + it_ar->first + "' was not successful: " + e.what()); + warn_client(e.what()); + update_client(ssprintf("Activation of plugin '%s' was not successful: %s", it_ar->first.c_str(), e.what())); } } } @@ -435,8 +435,7 @@ report_status_t Report(const map_crash_report_t& pCrashReport, { ret[pluginName].push_back("0"); ret[pluginName].push_back(e.what()); - warn_client("Report(): " + e.what()); - update_client("Reporting via '" + pluginName + "' was not successful: " + e.what()); + update_client(ssprintf("Reporting via %s' was not successful: %s", pluginName.c_str(), e.what())); } } } @@ -565,7 +564,7 @@ static mw_result_t SavePackageDescriptionToDebugDump(const char *pExecutable, } catch (CABRTException& e) { - warn_client("SavePackageDescriptionToDebugDump(): " + e.what()); + warn_client(e.what()); if (e.type() == EXCEP_DD_SAVE) { return MW_FILE_ERROR; @@ -601,8 +600,7 @@ static void RunAnalyzerActions(const char *pAnalyzer, const char *pDebugDumpDir) } catch (CABRTException& e) { - warn_client("RunAnalyzerActions(): " + e.what()); - update_client("Action performed by '" + pluginName + "' was not successful: " + e.what()); + update_client(ssprintf("Action performed by '%s' was not successful: %s", pluginName.c_str(), e.what())); } } } @@ -684,7 +682,7 @@ mw_result_t SaveDebugDump(const char *pDebugDumpDir, } catch (CABRTException& e) { - warn_client("SaveDebugDump(): " + e.what()); + warn_client(e.what()); if (e.type() == EXCEP_DD_SAVE) { return MW_FILE_ERROR; @@ -708,8 +706,8 @@ mw_result_t SaveDebugDump(const char *pDebugDumpDir, } mw_result_t GetCrashInfo(const char *pUUID, - const char *pUID, - map_crash_info_t& pCrashInfo) + const char *pUID, + map_crash_info_t& pCrashInfo) { pCrashInfo.clear(); CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase); @@ -734,7 +732,7 @@ mw_result_t GetCrashInfo(const char *pUUID, } catch (CABRTException& e) { - warn_client("GetCrashInfo(): " + e.what()); + warn_client(e.what()); if (e.type() == EXCEP_DD_LOAD) { return MW_FILE_ERROR; |
