Browse files

Avoid swallowing formatting exception on encoding problems

Use the repr of the message to give a meaningful error in case of messed-up
  • Loading branch information...
1 parent 3fdc11f commit a61595a57508d6133ca9080302135fea1a0b2d84 @dvarrazzo dvarrazzo committed Dec 5, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 logbook/
@@ -440,8 +440,8 @@ def message(self):
# access to the frame. But there is not much we can do about
# that.
errormsg = F('Could not format message with provided '
- 'arguments: {err}\n msg=\'{msg}\'\n '
- 'args={args} \n kwargs={kwargs}.\n'
+ 'arguments: {err}\n msg={msg!r}\n '
+ 'args={args!r} \n kwargs={kwargs!r}.\n'
'Happened in file {file}, line {lineno}').format(
err=e, msg=self.msg, args=self.args,
kwargs=self.kwargs, file=self.filename,

0 comments on commit a61595a

Please sign in to comment.