KS3ClientException.m
1.02 KB
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
//
// KS3ClientException.m
// KS3YunSDK
//
// Created by JackWong on 12/22/14.
// Copyright (c) 2014 kingsoft. All rights reserved.
//
#import "KS3ClientException.h"
@implementation KS3ClientException
+ (id)exceptionWithMessage:(NSString *)theMessage {
KS3ClientException *e =
[[[self class] alloc] initWithName:@"KS3ClientException"
reason:theMessage
userInfo:nil];
e.error = nil;
e.message = theMessage;
return e;
}
+ (id)exceptionWithMessage:(NSString *)theMessage andError:(NSError *)theError {
KS3ClientException *e =
[[[self class] alloc] initWithName:@"KS3ClientException"
reason:theMessage
userInfo:nil];
e.error = theError;
e.message = theMessage;
return e;
}
- (id)initWithMessage:(NSString *)theMessage {
self =
[super initWithName:@"KS3ClientException" reason:theMessage userInfo:nil];
if (self) {
_message = theMessage;
}
return self;
}
@end