Simple Exception Handler - Revelation part Deux
Simple Exception Handler - Revelation part Deux
- Subject: Simple Exception Handler - Revelation part Deux
- From: "Frederick C. Lee" <email@hidden>
- Date: Sat, 20 Apr 2002 08:40:04 -0700
I'm working with a simple Exception block:
NS_DURING
--- code here --- <-- [myException raise];
// Note: if I don't use this stmt, I get
the signal 4 error when a sys Exception occurs.
NS_HANDLER
--- alerts, etc. here ---
NS_ENDHANDLER
1) If I manually raise an exception within the block: [myException
raise]; it works.
However...
2) If I *DON'T* manually raise an exception (via system-level exception
like math/number error) I get the following:
2002-04-19 15:55:22.878 Converter[1059] *** Exception handlers were not
properly removed. Some code has jumped or returned out of an
NS_DURING...NS_HANDLER region without using the NS_VOIDRETURN or
NS_VALUERETURN macros.
Converter.app has exited due to signal 4 (SIGILL).
-----------------------
I tried to use " NS_VALUERETURN(0,double); " within the NS_HANDLER but
it has no effect. So I'm still having a problem if I don't manually
RAISE an exception.
What I want to do, it to capture ANY exception raised and display an
alert, and allow control to pass to the return(0) statement at the end
of the -(double) function that has this exception block.
Any ideas?
What is Signal 4 error?
Thanks.
Ric.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.