generator exceptions

2008-09-19 Thread Alexandru Mosoi
i have a generator that raises an exception when calling next(), however if I try to catch the exception and print the traceback i get only the line where next() was called while True: try: iterator.next() except StopIteration: break except Exception, e: traceback.print_exc()

Re: generator exceptions

2008-09-19 Thread Michael Palmer
On Sep 19, 9:40 am, Alexandru Mosoi [EMAIL PROTECTED] wrote: i have a generator that raises an exception when calling next(), however if I try to catch the exception and print the traceback i get only the line where next() was called while True: try: iterator.next() except

Re: generator exceptions

2008-09-19 Thread Gabriel Genellina
En Fri, 19 Sep 2008 10:40:00 -0300, Alexandru Mosoi [EMAIL PROTECTED] escribió: i have a generator that raises an exception when calling next(), however if I try to catch the exception and print the traceback i get only the line where next() was called while True: try: iterator.next()