Re-raising exceptions with modified message
Christoph Zwerschke
cito at online.de
Thu Jul 5 10:40:41 EDT 2007
More information about the Python-list mailing list
Thu Jul 5 10:40:41 EDT 2007
- Previous message (by thread): Re-raising exceptions with modified message
- Next message (by thread): Re-raising exceptions with modified message
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thomas Heller wrote: > I have the impression that you do NOT want to change the exceptions, > instead you want to print the traceback in a customized way. But I may be wrong... No, I really want to modify the exception, supplementing its message with additional information about the state of the program. The use case are compiled Kid templates (http://kid-templating.org). If an error occurs, I want to add the corresponding line number of the XML file as information for the template developer. Since the final error handling may happen somewhere else (e.g. by TurboGears importing a Kid template), I do not want to modify trackeback handling or something. -- Chris
- Previous message (by thread): Re-raising exceptions with modified message
- Next message (by thread): Re-raising exceptions with modified message
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list