diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-08-27 15:15:35 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-08-27 15:15:35 +0200 |
| commit | d4cdfdff42c777f5929017c1f26ecaed3d055cde (patch) | |
| tree | 121d7a97dbef28ac27ede4b477da5a0b57c35c9b /src/Daemon/CrashWatcher.cpp | |
| parent | 5aafe234442fa9cebe7202ef38ca213850eb5be8 (diff) | |
| download | abrt-d4cdfdff42c777f5929017c1f26ecaed3d055cde.tar.gz abrt-d4cdfdff42c777f5929017c1f26ecaed3d055cde.tar.xz abrt-d4cdfdff42c777f5929017c1f26ecaed3d055cde.zip | |
simplify error handling. CrashWatcher.cpp lost a few wrapper functions
-4k of code
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src/Daemon/CrashWatcher.cpp')
| -rw-r--r-- | src/Daemon/CrashWatcher.cpp | 92 |
1 files changed, 3 insertions, 89 deletions
diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp index 67121a67..06f05ee8 100644 --- a/src/Daemon/CrashWatcher.cpp +++ b/src/Daemon/CrashWatcher.cpp @@ -81,8 +81,8 @@ vector_crash_infos_t GetCrashInfos(const std::string &pUID) case MW_FILE_ERROR: { std::string debugDumpDir; - warn_client("Can not open file in debug dump directory for UUID: " + UUIDsUIDs[ii].first + ", deleting "); - update_client("Can not open file in debug dump directory for UUID: " + UUIDsUIDs[ii].first + ", deleting "); + warn_client("Can not open file in debug dump directory for UUID: " + UUIDsUIDs[ii].first + ", deleting"); + update_client("Can not open file in debug dump directory for UUID: " + UUIDsUIDs[ii].first + ", deleting"); debugDumpDir = DeleteCrashInfo(UUIDsUIDs[ii].first, UUIDsUIDs[ii].second); DeleteDebugDumpDir(debugDumpDir); } @@ -187,7 +187,7 @@ uint64_t CreateReport_t(const std::string& pUUID, const std::string& pUID, const free(thread_data->dest); free(thread_data); /* The only reason this may happen is system-wide resource starvation, - * or ulimit is exceeded (someoune floods us with CreateReport() Dbus calls?) + * or ulimit is exceeded (someoune floods us with CreateReport() dbus calls?) */ error_msg("cannot create thread"); return 0; @@ -224,89 +224,3 @@ map_crash_report_t GetJobResult(uint64_t pJobID, const std::string& pSender) */ return g_pending_jobs[pSender][pJobID]; } - -vector_map_string_string_t GetPluginsInfo() -{ - try - { - return g_pPluginManager->GetPluginsInfo(); - } - catch (CABRTException &e) - { - if (e.type() == EXCEP_FATAL) - { - throw e; - } - warn_client(e.what()); - } - // TODO: is it right? I added it just to disable a warning... - // but maybe returning empty map is wrong here? - return vector_map_string_string_t(); -} - -map_plugin_settings_t GetPluginSettings(const std::string& pName, const std::string& pUID) -{ - try - { - return g_pPluginManager->GetPluginSettings(pName, pUID); - } - catch(CABRTException &e) - { - if (e.type() == EXCEP_FATAL) - { - throw e; - } - warn_client(e.what()); - } - // TODO: is it right? I added it just to disable a warning... - // but maybe returning empty map is wrong here? - return map_plugin_settings_t(); -} - -void RegisterPlugin(const std::string& pName) -{ - try - { - g_pPluginManager->RegisterPlugin(pName); - } - catch(CABRTException &e) - { - if (e.type() == EXCEP_FATAL) - { - throw e; - } - warn_client(e.what()); - } -} - -void UnRegisterPlugin(const std::string& pName) -{ - try - { - g_pPluginManager->UnRegisterPlugin(pName); - } - catch(CABRTException &e) - { - if (e.type() == EXCEP_FATAL) - { - throw e; - } - warn_client(e.what()); - } -} - -void SetPluginSettings(const std::string& pName, const std::string& pUID, const map_plugin_settings_t& pSettings) -{ - try - { - g_pPluginManager->SetPluginSettings(pName, pUID, pSettings); - } - catch(CABRTException &e) - { - if (e.type() == EXCEP_FATAL) - { - throw e; - } - warn_client(e.what()); - } -} |
