mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +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
eb3e660985
commit
151f54de06
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>
|
||||
|
||||
* SSL/GSUnixSSLHandle.m: Change '#if HAVE...' to '#ifdef HAVE_...'
|
||||
|
|
|
@ -37,6 +37,10 @@
|
|||
/* Key for thread dictionary. */
|
||||
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
|
||||
{
|
||||
NSMutableDictionary *dict;
|
||||
|
@ -52,6 +56,11 @@ static NSString *dict_key = @"_NSAssertionHandler";
|
|||
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
|
||||
file: (NSString*)fileName
|
||||
lineNumber: (int)line
|
||||
|
@ -66,13 +75,18 @@ static NSString *dict_key = @"_NSAssertionHandler";
|
|||
stringWithFormat: @"%@:%d Assertion failed in %@. %@",
|
||||
fileName, line, functionName, format];
|
||||
NSLogv(message, ap);
|
||||
va_end(ap);
|
||||
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: message arguments: ap];
|
||||
va_end(ap);
|
||||
/* 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
|
||||
object: object
|
||||
file: (NSString *) fileName
|
||||
|
|
Loading…
Reference in a new issue