I would like to trigger an exception in a generator upon return from "yield" e.g. def mySimulationTask(): while 1: try: # drive forward one simulation step yield # do some stuff except HitWall: # handle this disaster ;-) How can I possibly do this? Maybe by hacking some internal generator variables? ;-) Thanks, Dominic h i l l b r _at_ rhrk.uni-kl.de