summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZdenek Prikryl <zprikryl@redhat.com>2009-08-18 17:43:56 +0200
committerZdenek Prikryl <zprikryl@redhat.com>2009-08-18 17:43:56 +0200
commit0b7136a7712f645a72ae30d3d561d6d1b11d8161 (patch)
tree9deb49f9edc512b275312e9da6eb9ca3df65d3c4
parent0c93e538246de251fa627d806cb5d3e569a7685d (diff)
downloadabrt-0b7136a7712f645a72ae30d3d561d6d1b11d8161.tar.gz
abrt-0b7136a7712f645a72ae30d3d561d6d1b11d8161.tar.xz
abrt-0b7136a7712f645a72ae30d3d561d6d1b11d8161.zip
in case of plugin error, don't delete debug dumps
-rw-r--r--src/Daemon/CrashWatcher.cpp7
-rw-r--r--src/Daemon/MiddleWare.cpp4
-rw-r--r--src/Daemon/MiddleWare.h1
3 files changed, 10 insertions, 2 deletions
diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp
index aefe3f93..e48b60b2 100644
--- a/src/Daemon/CrashWatcher.cpp
+++ b/src/Daemon/CrashWatcher.cpp
@@ -95,7 +95,7 @@ gboolean CCrashWatcher::handle_event_cb(GIOChannel *gio, GIOCondition condition,
switch (res)
{
case CMiddleWare::MW_OK:
- cc->Warning("New crash, saving...");
+ cc->Debug("New crash, saving...");
cc->m_pMW->RunActionsAndReporters(crashinfo[CD_MWDDD][CD_CONTENT]);
/* send message to dbus */
cc->m_pCommLayer->Crash(crashinfo[CD_PACKAGE][CD_CONTENT]);
@@ -103,7 +103,7 @@ gboolean CCrashWatcher::handle_event_cb(GIOChannel *gio, GIOCondition condition,
case CMiddleWare::MW_REPORTED:
case CMiddleWare::MW_OCCURED:
/* send message to dbus */
- cc->Warning("Already saved crash, deleting...");
+ cc->Debug("Already saved crash, deleting...");
cc->m_pCommLayer->Crash(crashinfo[CD_PACKAGE][CD_CONTENT]);
cc->m_pMW->DeleteDebugDumpDir(std::string(DEBUG_DUMPS_DIR) + "/" + name);
break;
@@ -165,6 +165,9 @@ void *CCrashWatcher::create_report(void *arg)
case CMiddleWare::MW_IN_DB_ERROR:
thread_data->daemon->Warning(std::string("Did not find crash with UUID ")+thread_data->UUID+ " in database.");
break;
+ case CMiddleWare::MW_PLUGIN_ERROR:
+ thread_data->daemon->Warning(std::string("Particular analyzer plugin isn't loaded or there is an error within plugin(s)."));
+ break;
case CMiddleWare::MW_CORRUPTED:
case CMiddleWare::MW_FILE_ERROR:
default:
diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp
index 5591203b..823fbddf 100644
--- a/src/Daemon/MiddleWare.cpp
+++ b/src/Daemon/MiddleWare.cpp
@@ -194,6 +194,10 @@ CMiddleWare::mw_result_t CMiddleWare::CreateCrashReport(const std::string& pUUID
{
return MW_FILE_ERROR;
}
+ else if (e.type() == EXCEP_PLUGIN)
+ {
+ return MW_PLUGIN_ERROR;
+ }
return MW_CORRUPTED;
}
diff --git a/src/Daemon/MiddleWare.h b/src/Daemon/MiddleWare.h
index a996a85b..87d6522d 100644
--- a/src/Daemon/MiddleWare.h
+++ b/src/Daemon/MiddleWare.h
@@ -50,6 +50,7 @@ class CMiddleWare
MW_OCCURED, /**< Crash occurred in the past, but it is not reported yet.*/
MW_IN_DB, /**< Debugdump directory is already saved in a database.*/
MW_IN_DB_ERROR, /**< Error while working with a database.*/
+ MW_PLUGIN_ERROR, /**< plugin wasn't found or error within plugin*/
MW_FILE_ERROR /**< Error when trying open debugdump directory or
when trying open file in debug dump directory..*/
} mw_result_t;