From 24d1b5fe6064390be9efdf079d9838bec92c0158 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Mon, 6 Jun 2016 08:55:38 -0400 Subject: drop try/catch wrapping EnableNotifications This can't possibly throw anything but a runtime error. --- ponymix.cc | 14 +++++--------- 1 file 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); -- cgit v1.2.3