/packages/cocoaint/src/foundation/NSError.inc
Pascal | 93 lines | 44 code | 17 blank | 32 comment | 0 complexity | d7b3e152d468e8ae545711d561ece8e4 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0
1{ Parsed from Foundation.framework NSError.h } 2 3{$ifdef TYPES} 4{$ifndef NSERROR_PAS_T} 5{$define NSERROR_PAS_T} 6 7{$endif} 8{$endif} 9 10{$ifdef RECORDS} 11{$ifndef NSERROR_PAS_R} 12{$define NSERROR_PAS_R} 13 14{$endif} 15{$endif} 16 17{$ifdef FUNCTIONS} 18{$ifndef NSERROR_PAS_F} 19{$define NSERROR_PAS_F} 20 21{$endif} 22{$endif} 23 24{$ifdef EXTERNAL_SYMBOLS} 25{$ifndef NSERROR_PAS_S} 26{$define NSERROR_PAS_S} 27 28{ External string constants } 29var 30 NSCocoaErrorDomain: NSString; cvar; external; 31 NSPOSIXErrorDomain: NSString; cvar; external; 32 NSOSStatusErrorDomain: NSString; cvar; external; 33 NSMachErrorDomain: NSString; cvar; external; 34 NSUnderlyingErrorKey: NSString; cvar; external; 35 NSLocalizedDescriptionKey: NSString; cvar; external; 36 NSLocalizedFailureReasonErrorKey: NSString; cvar; external; 37 NSLocalizedRecoverySuggestionErrorKey: NSString; cvar; external; 38 NSLocalizedRecoveryOptionsErrorKey: NSString; cvar; external; 39 NSRecoveryAttempterErrorKey: NSString; cvar; external; 40 NSHelpAnchorErrorKey: NSString; cvar; external; 41 NSStringEncodingErrorKey: NSString; cvar; external; 42 NSURLErrorKey: NSString; cvar; external; 43 NSFilePathErrorKey: NSString; cvar; external; 44 45{$endif} 46{$endif} 47 48{$ifdef FORWARD} 49 NSError = objcclass; 50 NSErrorPointer = ^NSError; 51 NSErrorPtr = NSErrorPointer; 52 53{$endif} 54 55{$ifdef CLASSES} 56{$ifndef NSERROR_PAS_C} 57{$define NSERROR_PAS_C} 58 59{ NSError } 60 NSError = objcclass external (NSObject, NSCopyingProtocol, NSCodingProtocol) 61 private 62 _reserved: Pointer; 63 _code: NSInteger; 64 _domain: NSString; 65 _userInfo: NSDictionary; 66 67 public 68 function initWithDomain_code_userInfo(domain_: NSString; code_: NSInteger; dict: NSDictionary): id; message 'initWithDomain:code:userInfo:'; 69 class function errorWithDomain_code_userInfo(domain_: NSString; code_: NSInteger; dict: NSDictionary): id; message 'errorWithDomain:code:userInfo:'; 70 function domain: NSString; message 'domain'; 71 function code: NSInteger; message 'code'; 72 function userInfo: NSDictionary; message 'userInfo'; 73 function localizedDescription: NSString; message 'localizedDescription'; 74 function localizedFailureReason: NSString; message 'localizedFailureReason'; 75 function localizedRecoverySuggestion: NSString; message 'localizedRecoverySuggestion'; 76 function localizedRecoveryOptions: NSArray; message 'localizedRecoveryOptions'; 77 function recoveryAttempter: id; message 'recoveryAttempter'; 78 function helpAnchor: NSString; message 'helpAnchor'; 79 80 { Adopted Protocols } 81 function copyWithZone(zone_: NSZonePtr): id; 82 procedure encodeWithCoder(aCoder: NSCoder); 83 function initWithCoder(aDecoder: NSCoder): id; 84 end; 85 86{ NSErrorRecoveryAttemptingCategory } 87 NSErrorRecoveryAttemptingCategory = objccategory external (NSObject) 88 procedure attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo(error: NSError; recoveryOptionIndex: NSUInteger; delegate: id; didRecoverSelector: SEL; contextInfo: Pointer); message 'attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:'; 89 function attemptRecoveryFromError_optionIndex(error: NSError; recoveryOptionIndex: NSUInteger): Boolean; message 'attemptRecoveryFromError:optionIndex:'; 90 end; 91 92{$endif} 93{$endif}