Re-raising exceptions with modified message

fumanchu fumanchu at
Mon Jul 16 18:50:50 CEST 2007

On Jul 15, 2:55 am, Christoph Zwerschke <c... at> wrote:
> Here is a simple solution, but it depends
> on the existence of the args attribute that
> "will eventually be deprecated" according
> to the docs

If you don't mind using .args, then the solution is usually as simple

try:, arg2)
except Exception, e:
    e.args += (Thing.state, arg1, arg2)

No over-engineering needed. ;)

Robert Brewer
System Architect
Amor Ministries
fumanchu at

More information about the Python-list mailing list