From 4ceb3715a3a6b752009627b0dc6a1974664c03a1 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 6 Dec 2009 22:23:11 +0100 Subject: remove std::string usage from class CABRTException. Signed-off-by: Denys Vlasenko --- lib/Plugins/Logger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Plugins/Logger.cpp') diff --git a/lib/Plugins/Logger.cpp b/lib/Plugins/Logger.cpp index 7267b64..9f261a3 100644 --- a/lib/Plugins/Logger.cpp +++ b/lib/Plugins/Logger.cpp @@ -84,7 +84,7 @@ std::string CLogger::Report(const map_crash_report_t& pCrashReport, return "file://" + m_sLogPath; } - throw CABRTException(EXCEP_PLUGIN, "CLogger::Report(): Cannot open file: " + m_sLogPath); + throw CABRTException(EXCEP_PLUGIN, "Can't open file '%s'", m_sLogPath); } PLUGIN_INFO(REPORTER, -- cgit From fb72ac689ca4832fca215edc942ae01592ecfff8 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 7 Dec 2009 11:46:13 +0100 Subject: *: remove most of remaining const string& params Signed-off-by: Denys Vlasenko --- lib/Plugins/Logger.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/Plugins/Logger.cpp') diff --git a/lib/Plugins/Logger.cpp b/lib/Plugins/Logger.cpp index 9f261a3..35f042c 100644 --- a/lib/Plugins/Logger.cpp +++ b/lib/Plugins/Logger.cpp @@ -60,7 +60,8 @@ void CLogger::SetSettings(const map_plugin_settings_t& pSettings) //} std::string CLogger::Report(const map_crash_report_t& pCrashReport, - const map_plugin_settings_t& pSettings, const std::string& pArgs) + const map_plugin_settings_t& pSettings, + const char *pArgs) { update_client(_("Creating a report...")); @@ -84,7 +85,7 @@ std::string CLogger::Report(const map_crash_report_t& pCrashReport, return "file://" + m_sLogPath; } - throw CABRTException(EXCEP_PLUGIN, "Can't open file '%s'", m_sLogPath); + throw CABRTException(EXCEP_PLUGIN, "Can't open file '%s'", m_sLogPath.c_str()); } PLUGIN_INFO(REPORTER, -- cgit From 890f62322fc8fee262e39a10428b1a2489edf267 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 11 Dec 2009 16:43:57 +0100 Subject: abrt-cli: report success/failure of reporting. closes bug 71 See https://fedorahosted.org/abrt/ticket/71 Signed-off-by: Denys Vlasenko --- lib/Plugins/Logger.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Plugins/Logger.cpp') diff --git a/lib/Plugins/Logger.cpp b/lib/Plugins/Logger.cpp index 35f042c..a0dea42 100644 --- a/lib/Plugins/Logger.cpp +++ b/lib/Plugins/Logger.cpp @@ -63,7 +63,6 @@ std::string CLogger::Report(const map_crash_report_t& pCrashReport, const map_plugin_settings_t& pSettings, const char *pArgs) { - update_client(_("Creating a report...")); std::string description = make_description_logger(pCrashReport); description += "\n\n\n"; @@ -80,12 +79,13 @@ std::string CLogger::Report(const map_crash_report_t& pCrashReport, if (fOut) { + update_client(_("Writing report to '%s'"), m_sLogPath.c_str()); fputs(description.c_str(), fOut); fclose(fOut); return "file://" + m_sLogPath; } - throw CABRTException(EXCEP_PLUGIN, "Can't open file '%s'", m_sLogPath.c_str()); + throw CABRTException(EXCEP_PLUGIN, "Can't open '%s'", m_sLogPath.c_str()); } PLUGIN_INFO(REPORTER, -- cgit