mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Tidied exceptions somewhat.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13808 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bb79908cca
commit
9c580a7d7a
4 changed files with 56 additions and 34 deletions
|
@ -3,6 +3,9 @@
|
|||
* Source/NSObject.m: Implemented and documented -className
|
||||
* Tools/AGSOutput.m: When Verbose = YES log all documentable
|
||||
entities for which no comment text was found.
|
||||
* Source/NSException.m: Added NSParseErrorException and tidied other
|
||||
general exceptions.
|
||||
* Source/extern.m: Removed generic exceptions ... now in NSException.m
|
||||
|
||||
2002-06-06 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
|
|
|
@ -59,12 +59,15 @@
|
|||
@end
|
||||
|
||||
/* Common exceptions */
|
||||
GS_EXPORT NSString* const NSGenericException;
|
||||
GS_EXPORT NSString* const NSInternalInconsistencyException;
|
||||
GS_EXPORT NSString* const NSInvalidArgumentException;
|
||||
GS_EXPORT NSString* const NSMallocException;
|
||||
GS_EXPORT NSString* const NSRangeException;
|
||||
GS_EXPORT NSString* const NSCharacterConversionException;
|
||||
GS_EXPORT const NSString* const NSGenericException;
|
||||
GS_EXPORT const NSString* const NSInternalInconsistencyException;
|
||||
GS_EXPORT const NSString* const NSInvalidArgumentException;
|
||||
GS_EXPORT const NSString* const NSMallocException;
|
||||
GS_EXPORT const NSString* const NSRangeException;
|
||||
GS_EXPORT const NSString* const NSCharacterConversionException;
|
||||
#ifndef STRICT_OPENSTEP
|
||||
GS_EXPORT const NSString* const NSParseErrorException;
|
||||
#endif
|
||||
|
||||
/* Exception handler definitions */
|
||||
typedef struct _NSHandler
|
||||
|
|
|
@ -34,6 +34,50 @@
|
|||
#include <Foundation/NSDictionary.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/**
|
||||
* A generic exception for general purpose usage.
|
||||
*/
|
||||
const NSString* const NSGenericException
|
||||
= @"NSGenericException";
|
||||
|
||||
/**
|
||||
* An exception for caes where unexpected state is detected within an object
|
||||
*/
|
||||
const NSString* const NSInternalInconsistencyException
|
||||
= @"NSInternalInconsistencyException";
|
||||
|
||||
/**
|
||||
* An exception used when an invalid argument is passed to a method
|
||||
* or function.
|
||||
*/
|
||||
const NSString* const NSInvalidArgumentException
|
||||
= @"NSInvalidArgumentException";
|
||||
|
||||
/**
|
||||
* An exception used when the system faols to allocate required memory.
|
||||
*/
|
||||
const NSString* const NSMallocException
|
||||
= @"NSMallocException";
|
||||
|
||||
/**
|
||||
* An exception used when an illegal range is encountered ... usually this
|
||||
* is used to provide more information than an invalid argument exception.
|
||||
*/
|
||||
const NSString* const NSRangeException
|
||||
= @"NSRangeException";
|
||||
|
||||
/**
|
||||
* An exception when character set conversion fails.
|
||||
*/
|
||||
const NSString* const NSCharacterConversionException
|
||||
= @"NSCharacterConversionException";
|
||||
|
||||
/**
|
||||
* An exception used when some form of parsing fails.
|
||||
*/
|
||||
const NSString* const NSParseErrorException
|
||||
= @"NSParseErrorException";
|
||||
|
||||
#include "GSPrivate.h"
|
||||
|
||||
static void
|
||||
|
|
|
@ -74,20 +74,6 @@ NSString *NSConnectionReplyMode;
|
|||
|
||||
|
||||
|
||||
/* Exceptions */
|
||||
NSString * const NSCharacterConversionException;
|
||||
|
||||
NSString * const NSGenericException;
|
||||
|
||||
NSString * const NSInternalInconsistencyException;
|
||||
|
||||
NSString * const NSInvalidArgumentException;
|
||||
|
||||
NSString * const NSMallocException;
|
||||
|
||||
NSString * const NSRangeException;
|
||||
|
||||
|
||||
/* Exception handler */
|
||||
NSUncaughtExceptionHandler *_NSUncaughtExceptionHandler;
|
||||
|
||||
|
@ -299,9 +285,6 @@ GSBuildStrings()
|
|||
= [[SClass alloc] initWithCString: "NSArgumentDomain"];
|
||||
NSBundleDidLoadNotification
|
||||
= [[SClass alloc] initWithCString: "NSBundleDidLoadNotification"];
|
||||
*(NSString**)&NSCharacterConversionException
|
||||
= [[SClass alloc] initWithCString:
|
||||
"NSCharacterConversionException"];
|
||||
NSConnectionDidDieNotification
|
||||
= [[SClass alloc] initWithCString:
|
||||
"NSConnectionDidDieNotification"];
|
||||
|
@ -386,19 +369,12 @@ GSBuildStrings()
|
|||
= [[SClass alloc] initWithCString: "NSFileTypeUnknown"];
|
||||
NSFormalName
|
||||
= [[SClass alloc] initWithCString: "NSFormalName"];
|
||||
*(NSString**)&NSGenericException
|
||||
= [[SClass alloc] initWithCString: "NSGenericException"];
|
||||
NSGlobalDomain
|
||||
= [[SClass alloc] initWithCString: "NSGlobalDomain"];
|
||||
NSHourNameDesignations
|
||||
= [[SClass alloc] initWithCString: "NSHourNameDesignations"];
|
||||
*(NSString**)&NSInternalInconsistencyException
|
||||
= [[SClass alloc] initWithCString:
|
||||
"NSInternalInconsistencyException"];
|
||||
NSInternationalCurrencyString
|
||||
= [[SClass alloc] initWithCString: "NSInternationalCurrencyString"];
|
||||
*(NSString**)&NSInvalidArgumentException
|
||||
= [[SClass alloc] initWithCString: "NSInvalidArgumentException"];
|
||||
NSLanguageCode
|
||||
= [[SClass alloc] initWithCString: "NSLanguageCode"];
|
||||
NSLanguageName
|
||||
|
@ -409,8 +385,6 @@ GSBuildStrings()
|
|||
= [[SClass alloc] initWithCString: "NSLoadedClasses"];
|
||||
NSLocale
|
||||
= [[SClass alloc] initWithCString: "NSLocale"];
|
||||
*(NSString**)&NSMallocException
|
||||
= [[SClass alloc] initWithCString: "NSMallocException"];
|
||||
NSMonthNameArray
|
||||
= [[SClass alloc] initWithCString: "NSMonthNameArray"];
|
||||
NSNegativeCurrencyFormatString
|
||||
|
@ -428,8 +402,6 @@ GSBuildStrings()
|
|||
"NSPositiveCurrencyFormatString"];
|
||||
NSPriorDayDesignations
|
||||
= [[SClass alloc] initWithCString: "NSPriorDayDesignations"];
|
||||
*(NSString**)&NSRangeException
|
||||
= [[SClass alloc] initWithCString: "NSRangeException"];
|
||||
NSRegistrationDomain
|
||||
= [[SClass alloc] initWithCString: "NSRegistrationDomain"];
|
||||
NSShortDateFormatString
|
||||
|
|
Loading…
Reference in a new issue