diff options
author | Lars Wirzenius <liw@liw.fi> | 2015-06-09 21:51:19 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2015-06-09 21:51:19 +0300 |
commit | 4940830c78d4a26ca62f8c980c9e397f0188c391 (patch) | |
tree | cc51f97f1fcf83c97644568c0c22bbc0104343f3 | |
parent | 66e628e1f4ede7b9dcc8aa5ea05aaf0e352987a4 (diff) | |
download | obnam-4940830c78d4a26ca62f8c980c9e397f0188c391.tar.gz |
Log IOError, OSError traceback before raising other exception
-rw-r--r-- | obnamlib/app.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/obnamlib/app.py b/obnamlib/app.py index 83bdf54a..d65e7cad 100644 --- a/obnamlib/app.py +++ b/obnamlib/app.py @@ -207,13 +207,15 @@ class App(cliapp.Application): cliapp.Application.process_args(self, args) self.hooks.call('shutdown') except IOError as e: + logging.critical('Caught IOError: %s', str(e), exc_info=True) raise ObnamIOError( errno=e.errno, strerror=e.strerror, filename=e.filename) except OSError as e: + logging.critical('Caught OSError: %s', str(e), exc_info=True) raise ObnamSystemError( errno=e.errno, strerror=e.strerror, filename=e.filename) except larch.Error as e: - logging.critical(str(e)) + logging.critical(str(e), exc_info=True) sys.stderr.write('ERROR: %s\n' % str(e)) sys.exit(1) except obnamlib.StructuredError as e: |