~ubuntu-branches/ubuntu/trusty/gnustep-base/trusty

« back to all changes in this revision

Viewing changes to Source/NSError.m

Tags: upstream-1.20.0
ImportĀ upstreamĀ versionĀ 1.20.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
   Boston, MA 02111 USA.
23
23
   */
24
24
 
25
 
#include        <Foundation/NSDictionary.h>
26
 
#include        <Foundation/NSString.h>
27
 
#include        <Foundation/NSError.h>
28
 
#include        <Foundation/NSCoder.h>
 
25
#import "common.h"
 
26
#define EXPOSE_NSError_IVARS    1
 
27
#import "Foundation/NSDictionary.h"
 
28
#import "Foundation/NSError.h"
 
29
#import "Foundation/NSCoder.h"
29
30
 
30
31
NSString* const NSFilePathErrorKey = @"NSFilePathErrorKey";
31
32
NSString* const NSLocalizedDescriptionKey = @"NSLocalizedDescriptionKey";
50
51
@implementation NSError
51
52
 
52
53
+ (id) errorWithDomain: (NSString*)aDomain
53
 
                  code: (int)aCode
 
54
                  code: (NSInteger)aCode
54
55
              userInfo: (NSDictionary*)aDictionary
55
56
{
56
57
  NSError       *e = [self allocWithZone: NSDefaultMallocZone()];
59
60
  return AUTORELEASE(e);
60
61
}
61
62
 
62
 
- (int) code
 
63
- (NSInteger) code
63
64
{
64
65
  return _code;
65
66
}
133
134
}
134
135
 
135
136
- (id) initWithDomain: (NSString*)aDomain
136
 
                 code: (int)aCode
 
137
                 code: (NSInteger)aCode
137
138
             userInfo: (NSDictionary*)aDictionary
138
139
{
139
140
  if (aDomain == nil)