-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b848f39
commit 4561fd0
Showing
6 changed files
with
93 additions
and
21 deletions.
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,15 @@ | ||
// | ||
// NSError+CSSketch.h | ||
// CSSketch Helper | ||
// | ||
// Created by John Coates on 3/17/16. | ||
// Copyright © 2016 John Coates. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface NSError (CSSketch) | ||
|
||
+ (instancetype)errorWithMessage:(NSString *)message; | ||
|
||
@end |
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,27 @@ | ||
// | ||
// NSError+CSSketch.m | ||
// CSSketch Helper | ||
// | ||
// Created by John Coates on 3/17/16. | ||
// Copyright © 2016 John Coates. All rights reserved. | ||
// | ||
|
||
#import "NSError+CSSketch.h" | ||
|
||
@implementation NSError (CSSketch) | ||
|
||
+ (instancetype)errorWithMessage:(NSString *)message { | ||
NSError *error; | ||
NSDictionary *userInfo; | ||
|
||
userInfo = @{ | ||
NSLocalizedDescriptionKey : message | ||
}; | ||
error = [NSError errorWithDomain:@"CSK" | ||
code:801 | ||
userInfo:userInfo]; | ||
|
||
return error; | ||
} | ||
|
||
@end |
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
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