summaryrefslogtreecommitdiffstats
path: root/lib/Plugins/Mailx.cpp
diff options
context:
space:
mode:
authorZdenek Prikryl <zdeny@dhcp-lab-218.englab.brq.redhat.com>2009-04-23 16:10:55 +0200
committerZdenek Prikryl <zdeny@dhcp-lab-218.englab.brq.redhat.com>2009-04-23 16:10:55 +0200
commit7b2d4874b7bd992ef3f09124b7ebbc346eba01f4 (patch)
tree82d62057cf9cae9b4a1fca46f9f30693d92a3f6e /lib/Plugins/Mailx.cpp
parent4fa35669bd72794b1acae57c98e57297d9e65794 (diff)
downloadabrt-7b2d4874b7bd992ef3f09124b7ebbc346eba01f4.tar.gz
abrt-7b2d4874b7bd992ef3f09124b7ebbc346eba01f4.tar.xz
abrt-7b2d4874b7bd992ef3f09124b7ebbc346eba01f4.zip
added new abrt exceptions
Diffstat (limited to 'lib/Plugins/Mailx.cpp')
-rw-r--r--lib/Plugins/Mailx.cpp9
1 files changed, 5 insertions, 4 deletions
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 <stdio.h>
#include <sstream>
#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;