Skip to content

Commit

Permalink
Add nested exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
dwt authored and hannosch committed May 13, 2017
1 parent 9a5932e commit f9fbb2a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/OFS/CopySupport.py
Expand Up @@ -22,6 +22,7 @@
from zlib import compress
from zlib import decompressobj
import transaction
import six

from AccessControl import ClassSecurityInfo
from AccessControl import getSecurityManager
Expand Down Expand Up @@ -181,8 +182,8 @@ def manage_pasteObjects(self, cb_copy_data=None, REQUEST=None):

try:
op, mdatas = _cb_decode(cp)
except Exception:
raise CopyError('Clipboard Error')
except Exception as e:
six.raise_from(CopyError('Clipboard Error'), e)

oblist = []
app = self.getPhysicalRoot()
Expand Down

0 comments on commit f9fbb2a

Please sign in to comment.