Re: How to interrupt a function
Re: How to interrupt a function
- Subject: Re: How to interrupt a function
- From: Shawn Erickson <email@hidden>
- Date: Wed, 30 Nov 2005 10:07:41 -0800
On 11/30/05, j o a r <email@hidden> wrote:
>
> On 30 nov 2005, at 17.27, Andrea Salomoni wrote:
>
> > All works fine until (for some problem) the server will go down.
> > if the server is down the method [socket connectToHostName:host
> > port:port]; returns false, but the GUI is not available (while
> > isn't multithread app and the socket blocking is set on YES.).
>
> But you don't check for the return value of the "connectToHost" method.
> Also, where does the exception come from? When you call methods that
> can throw exceptions, you need to use guards. You simply have to. So,
> open your Cocoa-textbook and read up on that before you continue!
If you don't have a book handy review the following to understand
exceptions and how to handle them...
<http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/LanguageOverview/chapter_4_section_9.html>
<http://developer.apple.com/documentation/Cocoa/Conceptual/Exceptions/index.html>
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden