From d0580208598882379c2e268254b4685c53b8b719 Mon Sep 17 00:00:00 2001 From: Michael Lazar Date: Fri, 15 Jul 2016 01:10:28 -0700 Subject: [PATCH] Improving error handling. --- rtv/terminal.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rtv/terminal.py b/rtv/terminal.py index 7ff2b45..56e91c2 100644 --- a/rtv/terminal.py +++ b/rtv/terminal.py @@ -344,8 +344,11 @@ class Terminal(object): p = subprocess.Popen(args, shell=True) code = p.wait() if code != 0: - raise exceptions.BrowserError( - 'Program exited with status=%s' % code) + stdout, stderr = p.communicate() + # TODO: Need to get the error somehow, e.g. fbi without sudo + _logger.warning(stdout) + _logger.warning(stderr) + self.show_notification('Program exited with status=%s' % code) else: with self.loader('Opening page in a new window', delay=0): # Non-blocking, run with a full shell to support pipes