Improving error handling.
This commit is contained in:
@@ -344,8 +344,11 @@ class Terminal(object):
|
|||||||
p = subprocess.Popen(args, shell=True)
|
p = subprocess.Popen(args, shell=True)
|
||||||
code = p.wait()
|
code = p.wait()
|
||||||
if code != 0:
|
if code != 0:
|
||||||
raise exceptions.BrowserError(
|
stdout, stderr = p.communicate()
|
||||||
'Program exited with status=%s' % code)
|
# 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:
|
else:
|
||||||
with self.loader('Opening page in a new window', delay=0):
|
with self.loader('Opening page in a new window', delay=0):
|
||||||
# Non-blocking, run with a full shell to support pipes
|
# Non-blocking, run with a full shell to support pipes
|
||||||
|
|||||||
Reference in New Issue
Block a user