-
Notifications
You must be signed in to change notification settings - Fork 0
/
DD9D7959-F853-4336-B7B0-58C7862C8D8C.codesnippet
44 lines (40 loc) · 1.46 KB
/
DD9D7959-F853-4336-B7B0-58C7862C8D8C.codesnippet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDECodeSnippetCompletionPrefix</key>
<string>validate</string>
<key>IDECodeSnippetCompletionScopes</key>
<array>
<string>ClassImplementation</string>
</array>
<key>IDECodeSnippetContents</key>
<string>- (BOOL)validate<#key#>:(<#Type#> **)<#value#> error:(NSError *__autoreleasing *)outError
{
BOOL isValid = YES;
NSError *combinedErrors = nil;
if (<#failing condition#>) {
isValid = NO;
if (outError != NULL) {
NSDictionary *userInfo = @{ NSLocalizedDescriptionKey : NSLocalizedString(<#Error Description#>, nil) };
NSError *error = [NSError errorWithDomain:MUValidationErrorDomain code:<#error code#> userInfo:userInfo];
combinedErrors = [error mu_errorByCombiningWithError:combinedErrors];
}
}
if (outError != NULL) {
*outError = combinedErrors;
}
return isValid;
}</string>
<key>IDECodeSnippetIdentifier</key>
<string>DD9D7959-F853-4336-B7B0-58C7862C8D8C</string>
<key>IDECodeSnippetLanguage</key>
<string>Xcode.SourceCodeLanguage.Objective-C</string>
<key>IDECodeSnippetTitle</key>
<string>Core Date KVO Validation</string>
<key>IDECodeSnippetUserSnippet</key>
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
</dict>
</plist>