aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2016-06-06 08:55:38 -0400
committerDave Reisner <dreisner@archlinux.org>2016-06-06 08:55:38 -0400
commit24d1b5fe6064390be9efdf079d9838bec92c0158 (patch)
tree53b255d43754decc790046c3867257f6324df950
parent32cfdf75e631925acd05de73879d2e879030e7bd (diff)
downloadmirror-ponymix-24d1b5fe6064390be9efdf079d9838bec92c0158.tar.gz
mirror-ponymix-24d1b5fe6064390be9efdf079d9838bec92c0158.tar.bz2
mirror-ponymix-24d1b5fe6064390be9efdf079d9838bec92c0158.zip
drop try/catch wrapping EnableNotifications
This can't possibly throw anything but a runtime error.
-rw-r--r--ponymix.cc14
1 files changed, 5 insertions, 9 deletions
diff --git a/ponymix.cc b/ponymix.cc
index 1464d9f..40e7286 100644
--- a/ponymix.cc
+++ b/ponymix.cc
@@ -665,17 +665,13 @@ int main(int argc, char* argv[]) {
if (opt_device == nullptr)
opt_device = defaults.GetDefault(opt_devtype).c_str();
- try {
#ifdef HAVE_NOTIFY
- if (opt_notify) {
- ponymix.EnableNotifications(new LibnotifyNotifier);
- } else
+ if (opt_notify) {
+ ponymix.EnableNotifications(new LibnotifyNotifier);
+ } else
#endif
- {
- ponymix.EnableNotifications(new CommandLineNotifier);
- }
- } catch (std::exception e) {
- fprintf(stderr, "failed to enable notifier\n");
+ {
+ ponymix.EnableNotifications(new CommandLineNotifier);
}
return CommandDispatch(ponymix, argc, argv);