We are updating a large Carbon accounting app to Cocoa.  There is a ton of
C++ model-layer code.  It originally was based on PowerPlant, but the new 
interface is Objective-C
with many bridges to the C++.

Our Carbon event loop had a try/catch block, which caught most exceptions, and 
then
continued.  It started as an expedient in early production, but it remained in 
production code 
since it often allows users to continue, save their work, etc.  

I know this is not standard use of C++ exceptions, but it has worked extremely 
well for a couple decades, 
on both Mac & Windows.There are a few thousand sanity checks which give a 
message and 
then throw.  The error msg gives file & code line so it makes bug fixes very 
easy.
Most asserts will never be called, so we don't want to clutter the code with 
try/catch blocks.
Nearly always, the event loop is the best place to escape to.

Is there a way to override the event loop in Cocoa?  Some other way we can 
escape to 
the event loop and then continue from there? 

Thanks,

Casey McDermott

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to