Skip to content

Commit

Permalink
Better error message on syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
SyZn authored and strichter committed May 23, 2017
1 parent 22068c2 commit 5f52047
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/zope/i18n/compile.py
Expand Up @@ -43,5 +43,5 @@ def compile_mo_file(domain, lc_messages_path):
fd = open(mofile, 'wb')
fd.write(mo.read())
fd.close()
except (IOError, OSError, PoSyntaxError):
logger.warn('Error while compiling %s' % pofile)
except (IOError, OSError, PoSyntaxError) as err:
logger.warn('Error while compiling %s (%s).' % (pofile, err.msg))

0 comments on commit 5f52047

Please sign in to comment.