mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Add exceptions for MacOS-X compatibility.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26325 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
508c7a2402
commit
9f68dcebcf
6 changed files with 78 additions and 41 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2008-03-17 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSPort.m:
|
||||||
|
* Source/NSException.m:
|
||||||
|
* Source/NSConnection.m:
|
||||||
|
* Headers/Foundation/NSException.h:
|
||||||
|
* Headers/Foundation/NSPort.h:
|
||||||
|
Update exceptions to match those in MacOS-X for compatibility.
|
||||||
|
|
||||||
2008-03-16 Matt Rice <ratmice@gmail.com>
|
2008-03-16 Matt Rice <ratmice@gmail.com>
|
||||||
|
|
||||||
* Source/NSException.m: Add NSObjectNotAvailableException.
|
* Source/NSException.m: Add NSObjectNotAvailableException.
|
||||||
|
|
|
@ -161,53 +161,79 @@ extern "C" {
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
/** An exception when character set conversion fails.
|
||||||
* A generic exception for general purpose usage.
|
*/
|
||||||
|
GS_EXPORT NSString* const NSCharacterConversionException;
|
||||||
|
|
||||||
|
/** Attempt to use an invalidated destination.
|
||||||
|
*/
|
||||||
|
GS_EXPORT NSString* const NSDestinationInvalidException;
|
||||||
|
|
||||||
|
/** A generic exception for general purpose usage.
|
||||||
*/
|
*/
|
||||||
GS_EXPORT NSString* const NSGenericException;
|
GS_EXPORT NSString* const NSGenericException;
|
||||||
|
|
||||||
/**
|
/** An exception for cases where unexpected state is detected within an object.
|
||||||
* An exception for cases where unexpected state is detected within an object.
|
|
||||||
*/
|
*/
|
||||||
GS_EXPORT NSString* const NSInternalInconsistencyException;
|
GS_EXPORT NSString* const NSInternalInconsistencyException;
|
||||||
|
|
||||||
/**
|
/** An exception used when an invalid argument is passed to a method
|
||||||
* An exception used when an invalid argument is passed to a method
|
|
||||||
* or function.
|
* or function.
|
||||||
*/
|
*/
|
||||||
GS_EXPORT NSString* const NSInvalidArgumentException;
|
GS_EXPORT NSString* const NSInvalidArgumentException;
|
||||||
|
|
||||||
/**
|
/** Attempt to use a receive port which has been invalidated.
|
||||||
* An exception used when the system fails to allocate required memory.
|
*/
|
||||||
|
GS_EXPORT NSString * const NSInvalidReceivePortException;
|
||||||
|
|
||||||
|
/** Attempt to use a send port which has been invalidated.
|
||||||
|
*/
|
||||||
|
GS_EXPORT NSString * const NSInvalidSendPortException;
|
||||||
|
|
||||||
|
/** An exception used when the system fails to allocate required memory.
|
||||||
*/
|
*/
|
||||||
GS_EXPORT NSString* const NSMallocException;
|
GS_EXPORT NSString* const NSMallocException;
|
||||||
|
|
||||||
/**
|
/** An exception when a remote object is sent a message from a thread
|
||||||
* An exception used when an illegal range is encountered ... usually this
|
|
||||||
* is used to provide more information than an invalid argument exception.
|
|
||||||
*/
|
|
||||||
GS_EXPORT NSString* const NSRangeException;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An exception when character set conversion fails.
|
|
||||||
*/
|
|
||||||
GS_EXPORT NSString* const NSCharacterConversionException;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An exception when a remote object is sent a message from a thread
|
|
||||||
* unable to access the object.
|
* unable to access the object.
|
||||||
*/
|
*/
|
||||||
GS_EXPORT NSString* const NSObjectInaccessibleException;
|
GS_EXPORT NSString* const NSObjectInaccessibleException;
|
||||||
|
|
||||||
|
/** Attempt to send to an object which is no longer available.
|
||||||
|
*/
|
||||||
GS_EXPORT NSString* const NSObjectNotAvailableException;
|
GS_EXPORT NSString* const NSObjectNotAvailableException;
|
||||||
|
|
||||||
|
/** UNused ... for MacOS-X compatibility.
|
||||||
|
*/
|
||||||
|
GS_EXPORT NSString* const NSOldStyleException;
|
||||||
|
|
||||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||||
/**
|
/** An exception used when some form of parsing fails.
|
||||||
* An exception used when some form of parsing fails.
|
|
||||||
*/
|
*/
|
||||||
GS_EXPORT NSString* const NSParseErrorException;
|
GS_EXPORT NSString* const NSParseErrorException;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/** Some failure to receive on a port.
|
||||||
|
*/
|
||||||
|
GS_EXPORT NSString * const NSPortReceiveException;
|
||||||
|
|
||||||
|
/** Some failure to send on a port.
|
||||||
|
*/
|
||||||
|
GS_EXPORT NSString * const NSPortSendException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Exception raised by [NSPort], [NSConnection], and friends if sufficient
|
||||||
|
* time elapses while waiting for a response, or if the receiving port is
|
||||||
|
* invalidated before a request can be received. See
|
||||||
|
* [NSConnection-setReplyTimeout:].
|
||||||
|
*/
|
||||||
|
GS_EXPORT NSString * const NSPortTimeoutException; /* OPENSTEP */
|
||||||
|
|
||||||
|
/** An exception used when an illegal range is encountered ... usually this
|
||||||
|
* is used to provide more information than an invalid argument exception.
|
||||||
|
*/
|
||||||
|
GS_EXPORT NSString* const NSRangeException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The actual structure for an NSHandler. You shouldn't need to worry about it.
|
* The actual structure for an NSHandler. You shouldn't need to worry about it.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -61,14 +61,6 @@ extern "C" {
|
||||||
- (void) handlePortMessage: (NSPortMessage*)aMessage;
|
- (void) handlePortMessage: (NSPortMessage*)aMessage;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
|
||||||
* Exception raised by [NSPort], [NSConnection], and friends if sufficient
|
|
||||||
* time elapses while waiting for a response, or if the receiving port is
|
|
||||||
* invalidated before a request can be received. See
|
|
||||||
* [NSConnection-setReplyTimeout:].
|
|
||||||
*/
|
|
||||||
GS_EXPORT NSString * const NSPortTimeoutException; /* OPENSTEP */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p><code>NSPort</code> is an abstract class defining interfaces underlying
|
* <p><code>NSPort</code> is an abstract class defining interfaces underlying
|
||||||
* communications in the distributed objects framework. Each side of a
|
* communications in the distributed objects framework. Each side of a
|
||||||
|
|
|
@ -109,6 +109,8 @@ extern NSRunLoop *GSRunLoopForThread(NSThread*);
|
||||||
#define M_LOCK(X) {NSDebugMLLog(@"GSConnection",@"Lock %@",X);[X lock];}
|
#define M_LOCK(X) {NSDebugMLLog(@"GSConnection",@"Lock %@",X);[X lock];}
|
||||||
#define M_UNLOCK(X) {NSDebugMLLog(@"GSConnection",@"Unlock %@",X);[X unlock];}
|
#define M_UNLOCK(X) {NSDebugMLLog(@"GSConnection",@"Unlock %@",X);[X unlock];}
|
||||||
|
|
||||||
|
NSString * const NSDestinationInvalidException =
|
||||||
|
@"NSDestinationInvalidException";
|
||||||
NSString * const NSFailedAuthenticationException =
|
NSString * const NSFailedAuthenticationException =
|
||||||
@"NSFailedAuthenticationExceptions";
|
@"NSFailedAuthenticationExceptions";
|
||||||
NSString * const NSObjectInaccessibleException =
|
NSString * const NSObjectInaccessibleException =
|
||||||
|
|
|
@ -656,6 +656,9 @@ GSListModules()
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
NSString* const NSCharacterConversionException
|
||||||
|
= @"NSCharacterConversionException";
|
||||||
|
|
||||||
NSString* const NSGenericException
|
NSString* const NSGenericException
|
||||||
= @"NSGenericException";
|
= @"NSGenericException";
|
||||||
|
|
||||||
|
@ -668,15 +671,15 @@ NSString* const NSInvalidArgumentException
|
||||||
NSString* const NSMallocException
|
NSString* const NSMallocException
|
||||||
= @"NSMallocException";
|
= @"NSMallocException";
|
||||||
|
|
||||||
NSString* const NSRangeException
|
NSString* const NSOldStyleException
|
||||||
= @"NSRangeException";
|
= @"NSOldStyleException";
|
||||||
|
|
||||||
NSString* const NSCharacterConversionException
|
|
||||||
= @"NSCharacterConversionException";
|
|
||||||
|
|
||||||
NSString* const NSParseErrorException
|
NSString* const NSParseErrorException
|
||||||
= @"NSParseErrorException";
|
= @"NSParseErrorException";
|
||||||
|
|
||||||
|
NSString* const NSRangeException
|
||||||
|
= @"NSRangeException";
|
||||||
|
|
||||||
static void _terminate()
|
static void _terminate()
|
||||||
{
|
{
|
||||||
BOOL shouldAbort;
|
BOOL shouldAbort;
|
||||||
|
|
|
@ -49,11 +49,16 @@
|
||||||
|
|
||||||
@implementation NSPort
|
@implementation NSPort
|
||||||
|
|
||||||
/**
|
NSString * const NSInvalidReceivePortException
|
||||||
* Exception raised if a timeout occurs during a port send or receive
|
= @"NSInvalidReceivePortException";
|
||||||
* operation.
|
NSString * const NSInvalidSendPortException
|
||||||
*/
|
= @"NSInvalidSendPortException";
|
||||||
NSString * const NSPortTimeoutException = @"NSPortTimeoutException";
|
NSString * const NSPortReceiveException
|
||||||
|
= @"NSPortReceiveException";
|
||||||
|
NSString * const NSPortSendException
|
||||||
|
= @"NSPortSendException";
|
||||||
|
NSString * const NSPortTimeoutException
|
||||||
|
= @"NSPortTimeoutException";
|
||||||
|
|
||||||
static Class NSPort_abstract_class;
|
static Class NSPort_abstract_class;
|
||||||
static Class NSPort_concrete_class;
|
static Class NSPort_concrete_class;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue