Skip to content
Newer
Older
100644 32 lines (23 sloc) 533 Bytes
a8d5761 first commit
cybercom authored Dec 10, 2009
1 #import "ErrorCode.h"
2
3
4 @implementation ErrorCode
5
6 @synthesize code;
7 @synthesize msg;
8
9 -(ErrorCode *) initWithCode: (NSInteger)newCode andMsg: (NSString *)newMsg {
10
11 if (self = [super init]) {
12 self.code = newCode;
13 self.msg = newMsg;
14 }
15 return self;
16 }
17
18 +(ErrorCode *)UPLOAD_FAIL {
19 static ErrorCode *upload_fail = nil;
20 if (upload_fail == nil) {
21 upload_fail = [[ErrorCode alloc] initWithCode:3 andMsg:@"Upload fail"];
22 }
23 return upload_fail;
24 }
25
26 -(void) dealloc {
27 [msg release];
28 [super dealloc];
29 }
30 @end
31
Something went wrong with that request. Please try again.