Mercurial > p > roundup > code
comparison roundup/mailgw.py @ 5085:d3d9d1402763
issue2550823 Improve mailgw logging for node creation errors. Add a
call to logger.exception when an error is raised on creation
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 18 Jun 2016 00:39:01 -0400 |
| parents | d995ee7d49bf |
| children | 14abd0a67207 |
comparison
equal
deleted
inserted
replaced
| 5084:675b3b3d88f0 | 5085:d3d9d1402763 |
|---|---|
| 1196 raise Unauthorized, _('You are not permitted to set ' | 1196 raise Unauthorized, _('You are not permitted to set ' |
| 1197 'property %(prop)s of class %(classname)s.' | 1197 'property %(prop)s of class %(classname)s.' |
| 1198 ) % locals() | 1198 ) % locals() |
| 1199 self.nodeid = self.cl.create(**self.props) | 1199 self.nodeid = self.cl.create(**self.props) |
| 1200 except (TypeError, IndexError, ValueError, exceptions.Reject), message: | 1200 except (TypeError, IndexError, ValueError, exceptions.Reject), message: |
| 1201 self.mailgw.logger.exception("Rejecting email due to node creation error:") | |
| 1201 raise MailUsageError, _(""" | 1202 raise MailUsageError, _(""" |
| 1202 There was a problem with the message you sent: | 1203 There was a problem with the message you sent: |
| 1203 %(message)s | 1204 %(message)s |
| 1204 """) % locals() | 1205 """) % locals() |
| 1205 | 1206 |
