forked from pmougin/F-Script
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathFSError.m
38 lines (28 loc) · 804 Bytes
/
FSError.m
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
/* FSError.m Copyright (c) 2002-2006 Philippe Mougin. */
/* This software is open source. See the license. */
#import "FSError.h"
#import "FSBoolean.h"
@implementation FSError
+ (FSError *) errorWithDescription:(NSString*)desc { return [[self alloc] initWithDescription:desc]; }
- (id)copyWithZone:(NSZone *)zone { return [self retain]; }
- (NSString *)description { return description; }
- (void) dealloc
{
[description release];
[super dealloc];
}
- initWithDescription:(NSString*)desc
{
if ((self = [super init]))
{
description = [desc retain];
return self;
}
return nil;
}
- (FSBoolean *)operator_less:(id)operand
{
if ([operand isKindOfClass:[self class]]) return [FSBoolean fsFalse];
else return [FSBoolean fsTrue];
}
@end