gnome-system-monitor r2553 - trunk/src
- From: bdejean svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-system-monitor r2553 - trunk/src
- Date: Tue, 20 Jan 2009 00:17:27 +0000 (UTC)
Author: bdejean
Date: Tue Jan 20 00:17:27 2009
New Revision: 2553
URL: http://svn.gnome.org/viewvc/gnome-system-monitor?rev=2553&view=rev
Log:
Try to catch exceptions about broken icons / icon themes.
Closes #568156.
Modified:
trunk/src/prettytable.cpp
Modified: trunk/src/prettytable.cpp
==============================================================================
--- trunk/src/prettytable.cpp (original)
+++ trunk/src/prettytable.cpp Tue Jan 20 00:17:27 2009
@@ -237,8 +237,19 @@
Glib::RefPtr<Gdk::Pixbuf> icon;
- for (size_t i = 0; not icon and i < getters.size(); ++i)
- icon = (this->*getters[i])(info);
+ for (size_t i = 0; not icon and i < getters.size(); ++i) {
+ try {
+ icon = (this->*getters[i])(info);
+ }
+ catch (std::exception& e) {
+ g_warning("Failed to load icon for %s(%u) : %s", info.name, info.pid, e.what());
+ continue;
+ }
+ catch (Glib::Exception& e) {
+ g_warning("Failed to load icon for %s(%u) : %s", info.name, info.pid, e.what().c_str());
+ continue;
+ }
+ }
info.set_icon(icon);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]