From 7b2d4874b7bd992ef3f09124b7ebbc346eba01f4 Mon Sep 17 00:00:00 2001 From: Zdenek Prikryl Date: Thu, 23 Apr 2009 16:10:55 +0200 Subject: added new abrt exceptions --- lib/Plugins/Mailx.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/Plugins/Mailx.cpp') diff --git a/lib/Plugins/Mailx.cpp b/lib/Plugins/Mailx.cpp index b7cdcfe..6a5cb59 100644 --- a/lib/Plugins/Mailx.cpp +++ b/lib/Plugins/Mailx.cpp @@ -23,6 +23,7 @@ #include #include #include "DebugDump.h" +#include "ABRTException.h" #include "PluginSettings.h" #define MAILX_COMMAND "/bin/mailx" @@ -48,11 +49,11 @@ void CMailx::SendEmail(const std::string& pSubject, const std::string& pText) command = popen(mailx_command.c_str(), "w"); if (!command) { - throw std::string("CMailx::SendEmail: Can not execute mailx."); + throw CABRTException(EXCEP_PLUGIN, "CMailx::SendEmail(): Can not execute mailx."); } if (fputs(pText.c_str(), command) == -1) { - throw std::string("CMailx::SendEmail: Can not send data."); + throw CABRTException(EXCEP_PLUGIN, "CMailx::SendEmail(): Can not send data."); } pclose(command); } @@ -68,7 +69,7 @@ void CMailx::Report(const map_crash_report_t& pCrashReport, const std::string& p { if (it->second[CD_TYPE] == CD_TXT) { - if (it->first != FILENAME_UUID && + if (it->first != CD_UUID && it->first != FILENAME_ARCHITECTURE && it->first != FILENAME_KERNEL && it->first != FILENAME_PACKAGE) @@ -77,7 +78,7 @@ void CMailx::Report(const map_crash_report_t& pCrashReport, const std::string& p additionalFiles << "-----" << std::endl; additionalFiles << it->second[CD_CONTENT] << std::endl << std::endl; } - else if (it->first == FILENAME_UUID) + else if (it->first == CD_UUID) { UUIDFile << it->first << std::endl; UUIDFile << "-----" << std::endl; -- cgit