forked from billymeltdown/cocoafob
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrote a function to assign errors nicely. Not overly happy with this …
…but it needs to be available to multiple classes.
- Loading branch information
Danny Greg
committed
Aug 24, 2010
1 parent
14347f8
commit 0df633b
Showing
3 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// CFobError.h | ||
// cocoafob | ||
// | ||
// Created by Danny Greg on 24/08/2010. | ||
// Copyright 2010 Realmac Software. All rights reserved. | ||
// Licensed under CC Attribution Licence 3.0 <http://creativecommons.org/licenses/by/3.0/> | ||
// | ||
|
||
#import "CFobError.h" | ||
|
||
#import "CFobLicVerifier.h" | ||
|
||
void CFobAssignErrorWithDescriptionAndCode(NSError **err, NSString *description, NSInteger code) | ||
{ | ||
if (err != NULL) | ||
*err = [NSError errorWithDomain:[[NSBundle bundleForClass:[CFobLicVerifier class]] bundleIdentifier] code:code userInfo:[NSDictionary dictionaryWithObject:NSLocalizedStringFromTableInBundle(description, nil, [NSBundle bundleForClass:[CFobLicVerifier class]], nil) forKey:NSLocalizedDescriptionKey]]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters