summaryrefslogtreecommitdiff
path: root/rdiff-backup/rdiff_backup/robust.py
diff options
context:
space:
mode:
authorben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-10-05 15:42:42 +0000
committerben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-10-05 15:42:42 +0000
commit38df0d1a59d2c1fe80c563b39706047bd7ba94b5 (patch)
tree564f10c6f32768ffdc159692cecc804b11e096df /rdiff-backup/rdiff_backup/robust.py
parent1c08d51312515c0adbba4904498b60d632b8b70f (diff)
downloadrdiff-backup-38df0d1a59d2c1fe80c563b39706047bd7ba94b5.tar.gz
Added better logging for check_common_error - now it should be clearer
which file was being processed when error occurred. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@218 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/robust.py')
-rw-r--r--rdiff-backup/rdiff_backup/robust.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/rdiff-backup/rdiff_backup/robust.py b/rdiff-backup/rdiff_backup/robust.py
index cecd33c..97bfb50 100644
--- a/rdiff-backup/rdiff_backup/robust.py
+++ b/rdiff-backup/rdiff_backup/robust.py
@@ -255,7 +255,7 @@ class Robust:
except (EnvironmentError, SkipFileException, DSRPPermError,
RPathException, Rdiff.RdiffException,
librsync.librsyncError, C.UnknownFileTypeError), exc:
- TracebackArchive.add()
+ TracebackArchive.add([function] + args)
if (not isinstance(exc, EnvironmentError) or
(errno.errorcode[exc[0]] in
['EPERM', 'ENOENT', 'EACCES', 'EBUSY', 'EEXIST',
@@ -300,9 +300,14 @@ class SignalException(Exception):
class TracebackArchive:
"""Save last 10 caught exceptions, so they can be printed if fatal"""
_traceback_strings = []
- def add(cls):
- """Add most recent exception to archived list"""
- cls._traceback_strings.append(Log.exception_to_string())
+ def add(cls, extra_args = []):
+ """Add most recent exception to archived list
+
+ If extra_args are present, convert to strings and add them as
+ extra information to same traceback archive.
+
+ """
+ cls._traceback_strings.append(Log.exception_to_string(extra_args))
if len(cls._traceback_strings) > 10:
cls._traceback_strings = cls._traceback_strings[:10]