diff options
| author | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-03-17 11:28:45 +0100 |
|---|---|---|
| committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-03-17 11:28:45 +0100 |
| commit | 8c68c3576464947a43ada0d02cfb3313cb7ec697 (patch) | |
| tree | 9bccb437a0d413b2cc010bd5706439d8a4700fb7 /lib/Plugins/CCpp.cpp | |
| parent | cf36e4747df0409eee0d3f0ee023b8e781c4ae98 (diff) | |
| download | abrt-8c68c3576464947a43ada0d02cfb3313cb7ec697.tar.gz abrt-8c68c3576464947a43ada0d02cfb3313cb7ec697.tar.xz abrt-8c68c3576464947a43ada0d02cfb3313cb7ec697.zip | |
more excetpion handling
Diffstat (limited to 'lib/Plugins/CCpp.cpp')
| -rw-r--r-- | lib/Plugins/CCpp.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp index cd97410..a6ca00c 100644 --- a/lib/Plugins/CCpp.cpp +++ b/lib/Plugins/CCpp.cpp @@ -50,7 +50,7 @@ void CLanguageCCpp::InstallDebugInfos(const std::string& pPackage) if (fp == NULL) { - throw "CLanguageCCpp::InstallDebugInfos(): cannot execute " + command ; + throw std::string("CLanguageCCpp::InstallDebugInfos(): cannot execute " + command) ; } while (fgets(line, sizeof(line), fp)) { @@ -65,12 +65,12 @@ void CLanguageCCpp::InstallDebugInfos(const std::string& pPackage) if (text.find(canNotInstall) != std::string::npos) { pclose(fp); - throw "CLanguageCCpp::InstallDebugInfos(): cannot install debuginfos for " + pPackage + " (" + canNotInstall + ")" ; + throw std::string("CLanguageCCpp::InstallDebugInfos(): cannot install debuginfos for " + pPackage + " (" + canNotInstall + ")") ; } } if (pclose(fp) != 0) { - throw "CLanguageCCpp::InstallDebugInfos(): cannot install debuginfos for " + pPackage ; + throw std::string("CLanguageCCpp::InstallDebugInfos(): cannot install debuginfos for " + pPackage) ; } } @@ -210,8 +210,21 @@ void CLanguageCCpp::CreateReport(const std::string& pDebugDumpDir) return; } dd.LoadText(FILENAME_PACKAGE, package); - - InstallDebugInfos(package); + try + { + InstallDebugInfos(package); + } + catch(std::string& err) + { + dd.Close(); + throw err; + } + catch(...) + { + std::cerr << "generic catch..." << std::endl; + dd.Close(); + throw std::string("error"); + } GetBacktrace(pDebugDumpDir, backtrace); dd.SaveText(FILENAME_TEXTDATA1, backtrace); if (m_bMemoryMap) |
