Re: [Pyobjc-dev] ObjC exceptions, Python exceptions, the event loop
Brought to you by:
ronaldoussoren
From: Just v. R. <ju...@le...> - 2003-01-18 14:48:41
|
Just van Rossum wrote: > bb...@ma... wrote: > > > I don't believe NSApplicationMain() ever returns in any > > circumstances. It calls exit() directly. > > > > NSApplicationMain's declaration is a big lie. It ignores its > > inbound arguments and the outbound arguments. > > > > At least, I think it exit()s directly. > > Ah, as it now turns out: it indeed _doesn't_ return, yet you can > succesfully wrap it in an NS_HANDLER/NS_ETC. construct. It's extremely rude what NSApplicationMain does, a finally clause as below will _only_ be called if there was an exception: try: sys.exit(AppKit.NSApplicationMain(sys.argv)) finally: print "XXX exiting!" Blech! One for the phrase book... Just |