mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Minor bugfix and documentation update.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13582 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
fe2904d181
commit
54a2f4a2dd
2 changed files with 21 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2002-05-03 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSAssertion.m: Added comments and fixed bug in handling
|
||||||
|
an assertion in a function ... was calling va_end() before the last
|
||||||
|
use of the arguments.
|
||||||
|
|
||||||
2002-05-02 Richard Frith-Macdonald <rfm@gnu.org>
|
2002-05-02 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* SSL/GSUnixSSLHandle.m: Change '#if HAVE...' to '#ifdef HAVE_...'
|
* SSL/GSUnixSSLHandle.m: Change '#if HAVE...' to '#ifdef HAVE_...'
|
||||||
|
|
|
@ -37,6 +37,10 @@
|
||||||
/* Key for thread dictionary. */
|
/* Key for thread dictionary. */
|
||||||
static NSString *dict_key = @"_NSAssertionHandler";
|
static NSString *dict_key = @"_NSAssertionHandler";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the assertion handler object for the current thread.<br />
|
||||||
|
* If none exists, creates one and returns it.
|
||||||
|
*/
|
||||||
+ (NSAssertionHandler*) currentHandler
|
+ (NSAssertionHandler*) currentHandler
|
||||||
{
|
{
|
||||||
NSMutableDictionary *dict;
|
NSMutableDictionary *dict;
|
||||||
|
@ -52,6 +56,11 @@ static NSString *dict_key = @"_NSAssertionHandler";
|
||||||
return handler;
|
return handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles an assertion failure by using NSLogv() to print an error
|
||||||
|
* message built from the supplied arguments, and then raising an
|
||||||
|
* NSInternalInconsistencyException
|
||||||
|
*/
|
||||||
- (void) handleFailureInFunction: (NSString*)functionName
|
- (void) handleFailureInFunction: (NSString*)functionName
|
||||||
file: (NSString*)fileName
|
file: (NSString*)fileName
|
||||||
lineNumber: (int)line
|
lineNumber: (int)line
|
||||||
|
@ -66,13 +75,18 @@ static NSString *dict_key = @"_NSAssertionHandler";
|
||||||
stringWithFormat: @"%@:%d Assertion failed in %@. %@",
|
stringWithFormat: @"%@:%d Assertion failed in %@. %@",
|
||||||
fileName, line, functionName, format];
|
fileName, line, functionName, format];
|
||||||
NSLogv(message, ap);
|
NSLogv(message, ap);
|
||||||
va_end(ap);
|
|
||||||
|
|
||||||
[NSException raise: NSInternalInconsistencyException
|
[NSException raise: NSInternalInconsistencyException
|
||||||
format: message arguments: ap];
|
format: message arguments: ap];
|
||||||
|
va_end(ap);
|
||||||
/* NOT REACHED */
|
/* NOT REACHED */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles an assertion failure by using NSLogv() to print an error
|
||||||
|
* message built from the supplied arguments, and then raising an
|
||||||
|
* NSInternalInconsistencyException
|
||||||
|
*/
|
||||||
- (void) handleFailureInMethod: (SEL) aSelector
|
- (void) handleFailureInMethod: (SEL) aSelector
|
||||||
object: object
|
object: object
|
||||||
file: (NSString *) fileName
|
file: (NSString *) fileName
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue