Ticket #9365 (new Bug)
Opened 3 years ago
Error swallowing in object_paste.py
| Reported by: | dannyb | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 3.3.x |
| Component: | Infrastructure | Keywords: | |
| Cc: |
Description
There is this piece of code in there:
if context.cb_dataValid:
try:
context.manage_pasteObjects(context.REQUEST['__cp'])
transaction_note('Pasted content to %s' % (context.absolute_url()))
context.plone_utils.addPortalMessage(_(u'Item(s) pasted.'))
return state
except ConflictError:
raise
except ValueError:
msg=_(u'Disallowed to paste item(s).')
except (Unauthorized, 'Unauthorized'):
msg=_(u'Unauthorized to paste item(s).')
except: # fallback
msg=_(u'Paste could not find clipboard content.')
But, if another error than ConflictError and ValueError occurs it swallows this. Not only does it finish the transcation but the message is wrong as well.
I have made a ObjectMoved event handler that may raise errors but due to this they are ignored.
Note: See
TracTickets for help on using
tickets.
