Skip to content

Commit

Permalink
Drop the use of reraise in favor of logger.error(exc_info=).
Browse files Browse the repository at this point in the history
This is cleaner and faster.
Thanks @mgedmin.
  • Loading branch information
jamadden committed Jul 22, 2017
1 parent 06d29b2 commit 4e238b5
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/zope/error/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@

from persistent import Persistent

from six import reraise
from six import text_type


from zope.exceptions.exceptionformatter import format_exception
from zope.interface import implementer

Expand Down Expand Up @@ -228,10 +226,7 @@ def _do_copy_to_zlog(self, now, strtype, url, info):
now - _rate_restrict_burst * _rate_restrict_period)
next_when += _rate_restrict_period
_rate_restrict_pool[strtype] = next_when
try:
reraise(info[0], info[1], info[2])
except BaseException: # Yes, we really want everything.
logger.exception(str(url))
logger.error(str(url), exc_info=info)

def getProperties(self):
return {
Expand Down

0 comments on commit 4e238b5

Please sign in to comment.