diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-07-14 00:44:05 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-07-14 00:44:05 -0400 |
commit | 7245ad7bd9e5caafafe9162f54fa527859eaf6ca (patch) | |
tree | cf28b795179cd3db6c67e574c18a84c9ba7170e3 | |
parent | 85b14a8967f290c64cb214346966411653ec9e1a (diff) |
gnome-ask-password-agent: report GLib.Error only to stderr
When a GLib.Error happens, it is likely that showing a message box
would fail too.
Solution copied from systemadm and
https://bugzilla.redhat.com/show_bug.cgi?id=716663.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=716369
-rw-r--r-- | src/gnome-ask-password-agent.vala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gnome-ask-password-agent.vala b/src/gnome-ask-password-agent.vala index 5df27eed..0f6284dc 100644 --- a/src/gnome-ask-password-agent.vala +++ b/src/gnome-ask-password-agent.vala @@ -256,9 +256,10 @@ int main(string[] args) { MyStatusIcon i = new MyStatusIcon(); Gtk.main(); - - } catch (GLib.Error e) { + } catch (IOError e) { show_error(e.message); + } catch (GLib.Error e) { + Posix.stderr.printf("%s\n", e.message); } return 0; |