• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Simple Exception Handler - Revelation part Deux
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Simple Exception Handler - Revelation part Deux
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Re: Display Boolean Value in NSTableview
  • Next by Date: Re: NSStepper - How can I tell which arrow has been clicked?
  • Previous by thread: Re: Display Boolean Value in NSTableview
  • Next by thread: Re: Simple Exception Handler - Revelation part Deux
  • Index(es):
    • Date
    • Thread