• 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
catching and handling errors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

catching and handling errors


  • Subject: catching and handling errors
  • From: Jasper Touwen <email@hidden>
  • Date: Thu, 13 Jun 2002 00:18:48 +0200

Hai,

I'm building my first app in cocoa (first app in a real programming language), and i stumbled into a few problems..

I'm trying to figure out the exception handling in cocoa.

First of all the purpose: i've found somewhere some code to talk to mysql. This is (if i correctly understood c) and i'm building a little wrapper around it, so i can talk with the c-framework(libmysqlclient.a) with objective-C calls.

Here my problem. I looked at the code and i noticed the framework always returns a pointer (itself i presume) and NULL if there's an error. After that you can call a function for the description of that error. I could do the same with my wrapper (that is: return nil). But isn't there a better way to send and capture errors...

I did a bit of coding in .Net, c# and there were those nice statements as:
try{
// do something here
}catch(Exception e){
console.write(e.ToString());
}

If i'm correct a kind like Java....

Is there something like this in cocoa.

I would be glad with some pointers and help about handling errors...

Jasper.
_______________________________________________
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.

  • Prev by Date: Cocoa/Java - How to get files dropped onto app from Finder
  • Next by Date: NSMenuItem setImage:
  • Previous by thread: Re: Cocoa/Java - How to get files dropped onto app from Finder
  • Next by thread: -[NSTextField setStringValue]
  • Index(es):
    • Date
    • Thread