zerotk.xml-factory

XML/Dict/Json Generator.


Keywords
xml, dict, json, generator, pretty
License
GPL-3.0
Install
pip install zerotk.xml-factory==0.1.2

Documentation

PyPI Travis Coveralls

zerotk.reraiseit

A function to re-raise exceptions adding information to the traceback and with unicode support.

from zerotk.reraiseit import reraise

try:
  raise RuntimeError('An error occurred')
except Exception as e:
  reraise(e, '')

This will produce the following output:

(... traceback ...)
RuntimeError:
While testing reraise.
An error occurred

As you can see, it added a message to the exception and re-raise it.