Commit 55ffc29c authored by Jim Fulton's avatar Jim Fulton

Merge pull request #27 from zopefoundation/cleanup-exception-logging

Cleaned up exception logging and changed pins
parents 67aae9fb 1bbaa6e2
......@@ -7,7 +7,7 @@ python:
- 3.3
- 3.4
install:
- travis_retry pip install BTrees ZConfig manuel persistent six transaction zc.lockfile zdaemon zope.interface zope.testing zope.testrunner
- travis_retry pip install BTrees ZConfig manuel persistent six transaction zc.lockfile zdaemon zope.interface zope.testing zope.testrunner==4.4.4
- travis_retry pip install -e .
script:
- zope-testrunner -u --test-path=src --auto-color --auto-progress
......
......@@ -3,17 +3,18 @@ develop = .
parts =
test
scripts
versions = versions
[versions]
zc.recipe.testrunner = 2.0.0
zc.lockfile = 1.1.0
zope.interface = 4.0.3
ZConfig = 3.0.3
BTrees = 4.0.5
persistent = 4.0.6
transaction = 1.4.1
zdaemon = 4.0.0a1
# Avoid breakage in 4.4.5:
zope.testrunner = 4.4.4
# zc.recipe.testrunner = 2.0.0
# zc.lockfile = 1.1.0
# zope.interface = 4.0.3
# ZConfig = 3.0.3
# BTrees = 4.0.5
# persistent = 4.0.6
# transaction = 1.4.1
# zdaemon = 4.0.0a1
[test]
recipe = zc.recipe.testrunner
......
......@@ -302,7 +302,7 @@ def tryToResolveConflict(self, oid, committedSerial, oldSerial, newpickle,
# the original ConflictError. A client can recover from a
# ConflictError, but not necessarily from other errors. But log
# the error so that any problems can be fixed.
logger.error("Unexpected error", exc_info=True)
logger.exception("Unexpected error")
raise ConflictError(oid=oid, serials=(committedSerial, oldSerial),
data=newpickle)
......
......@@ -302,8 +302,7 @@ class Connection(ExportImport, object):
f()
except: # except what?
f = getattr(f, 'im_self', f)
self._log.error("Close callback failed for %s", f,
exc_info=sys.exc_info())
self._log.exception("Close callback failed for %s", f)
self.__onCloseCallbacks = None
self._debug_info = ()
......@@ -874,8 +873,7 @@ class Connection(ExportImport, object):
raise
except:
self._log.exception("Couldn't load state for %s %s",
className(obj), oid_repr(oid),
exc_info=sys.exc_info())
className(obj), oid_repr(oid))
raise
def _setstate(self, obj):
......
......@@ -809,7 +809,7 @@ class DB(object):
try:
self.storage.pack(t, self.references)
except:
logger.error("packing", exc_info=True)
logger.exception("packing")
raise
def setActivityMonitor(self, am):
......
......@@ -429,7 +429,7 @@ class FileStorage(
self._save_index()
except:
# Log the error and continue
logger.error("Error saving index on close()", exc_info=True)
logger.exception("Error saving index on close()")
def getSize(self):
return self._pos
......@@ -1665,8 +1665,7 @@ def _truncate(file, name, pos):
o.close()
break
except:
logger.error("couldn\'t write truncated data for %s", name,
exc_info=True)
logger.exception("couldn\'t write truncated data for %s", name)
raise StorageSystemError("Couldn't save truncated data")
file.seek(pos)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment