I also change sys.excepthook to call a special exception handler which
will dump me into pdb if an exception gets thrown. It looks something
like:
[in my gameloop __init__ class]:
sys.excepthook = lambda type, value, tb: \
exception.handleException(self, (type, value, tb))
and then make an exception module which looks like:
def handleException(installMethod, (exceptType, value, trace)):
sys.excepthook = sys.__excepthook__
trace = string.join(traceback.format_exception(exceptType, value, trace))
print trace
import pdb
pdb.pm()
You can throw some extra stuff in there to clean up the UI or any
classes as well. I guess I just assumed everyone was already doing
this. :-D
--Patrick.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---