Re: [Q] raise exception with fake filename and linenumber

2010-04-07 Thread Gabriel Genellina
En Wed, 07 Apr 2010 17:23:22 -0300, kwatch escribió: Is it possible to raise exception with custom traceback to specify file and line? I'm creating a certain parser. I want to report syntax error with the same format as other exception. - 1: def parse(filename): 2: i

[Q] raise exception with fake filename and linenumber

2010-04-07 Thread kwatch
Hi all, Is it possible to raise exception with custom traceback to specify file and line? Situation = I'm creating a certain parser. I want to report syntax error with the same format as other exception. Example === parser.py: - 1: def parse(filename): 2: