Define NSError Domain
Define NSError Domain
- Subject: Define NSError Domain
- From: Johan Kool <email@hidden>
- Date: Sat, 24 Sep 2005 00:52:57 +0100
Hello!
I am trying to do handling of errors in my application through use of
NSError. I hope someone can clarify a few things for me.
The documentation on NSError domains reads:
> You can create your own error domains and error codes for use in your own
> frameworks, or even in your own applications. It is recommended that the string
> constant for the domain be of the form com.company.framework_or_app.ErrorDomain.
But how do I define my own domains?
I understand that I can define my errors in this way (my adaption of
what I found in FoundationErrors.h):
enum {
// Errors that might happen in my app
JKMyOwnError = 100, // An error of my own
JKAnotherError = 200, // Another error
};
How do I associated these errors with my own domain?
Thanks!
Johan
_______________________________________________
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