git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18181 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Manuel Guesdon 2003-11-24 12:10:21 +00:00
parent f2a6286e51
commit ef4f64d56d
3 changed files with 23 additions and 14 deletions

View file

@ -182,13 +182,13 @@ extern void GSWLogAssertGoodFn(CONST char* file,int line,NSObject* object);
NSLog(@"%@",fmt2); }} while (0) NSLog(@"%@",fmt2); }} while (0)
#define LOGException(format, args...) \ #define LOGException(format, args...) \
do { if (GSDebugSet(@"exception") == YES) { \ do { /*if (GSDebugSet(@"exception") == YES)*/ { \
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,format); \ NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,format); \
NSString *fmt2 = [NSString stringWithFormat:@"*EXCEPTION*: %@",fmt]; \ NSString *fmt2 = [NSString stringWithFormat:@"*EXCEPTION*: %@",fmt]; \
NSLog(fmt2, ## args); }} while (0) NSLog(fmt2, ## args); }} while (0)
#define LOGException0(format) \ #define LOGException0(format) \
do { if (GSDebugSet(@"exception") == YES) { \ do { /*if (GSDebugSet(@"exception") == YES)*/ { \
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,format); \ NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,format); \
NSString *fmt2 = [NSString stringWithFormat:@"*EXCEPTION*: %@",fmt]; \ NSString *fmt2 = [NSString stringWithFormat:@"*EXCEPTION*: %@",fmt]; \
NSLog(@"%@",fmt2); }} while (0) NSLog(@"%@",fmt2); }} while (0)

View file

@ -42,20 +42,25 @@ BYTE ElementsMap_attributeElement = (BYTE)0x41;
@implementation GSWElement @implementation GSWElement
#ifndef NDEBBUG #ifndef NDEBBUG
//--------------------------------------------------------------------
-(void)saveAppendToResponseElementIDInContext:(id)context -(void)saveAppendToResponseElementIDInContext:(id)context
{ {
NSString* elementID=nil; if(GSDebugSet(@"saveAppendToResponseElementID"))
LOGObjectFnStartC("GSWElement"); {
elementID=[context elementID]; NSString* elementID=nil;
/* if ([elementID length]==0) LOGObjectFnStartC("GSWElement");
elementID=@"MARKER";*/ elementID=[context elementID];
NSDebugMLLog(@"GSWElement",@"self=%p definitionName=%@ elementID=%@ %p",self,[self definitionName],elementID,elementID); /* if ([elementID length]==0)
ASSIGNCOPY(_appendToResponseElementID,elementID); elementID=@"MARKER";*/
NSDebugMLLog(@"GSWElement",@"self=%p definitionName=%@ _appendToResponseElementID=%@ %p",self,[self definitionName],_appendToResponseElementID,_appendToResponseElementID); NSDebugMLLog(@"GSWElement",@"self=%p definitionName=%@ elementID=%@ %p",self,[self definitionName],elementID,elementID);
GSWAssertIsElementID(context); ASSIGNCOPY(_appendToResponseElementID,elementID);
LOGObjectFnStopC("GSWElement"); NSDebugMLLog(@"GSWElement",@"self=%p definitionName=%@ _appendToResponseElementID=%@ %p",self,[self definitionName],_appendToResponseElementID,_appendToResponseElementID);
GSWAssertIsElementID(context);
LOGObjectFnStopC("GSWElement");
};
}; };
//--------------------------------------------------------------------
-(void)assertCorrectElementIDInContext:(id)context -(void)assertCorrectElementIDInContext:(id)context
method:(SEL)method method:(SEL)method
file:(const char*)file file:(const char*)file
@ -100,6 +105,7 @@ BYTE ElementsMap_attributeElement = (BYTE)0x41;
LOGObjectFnStopC("GSWElement"); LOGObjectFnStopC("GSWElement");
}; };
//--------------------------------------------------------------------
-(void)assertIsElementIDInContext:(id)context -(void)assertIsElementIDInContext:(id)context
method:(SEL)method method:(SEL)method
file:(const char*)file file:(const char*)file
@ -127,6 +133,7 @@ BYTE ElementsMap_attributeElement = (BYTE)0x41;
LOGObjectFnStopC("GSWElement"); LOGObjectFnStopC("GSWElement");
}; };
//--------------------------------------------------------------------
-(void)logElementInContext:(id)context -(void)logElementInContext:(id)context
method:(SEL)method method:(SEL)method
file:(const char*)file file:(const char*)file
@ -163,11 +170,13 @@ BYTE ElementsMap_attributeElement = (BYTE)0x41;
GSWLogC("End Dealloc GSWElement"); GSWLogC("End Dealloc GSWElement");
} }
//--------------------------------------------------------------------
-(NSString*)definitionName -(NSString*)definitionName
{ {
return _definitionName; return _definitionName;
}; };
//--------------------------------------------------------------------
-(void)setDefinitionName:(NSString*)definitionName -(void)setDefinitionName:(NSString*)definitionName
{ {
NSDebugMLLog(@"gswdync",@"setDefinitionName1 in %p: %p %@", NSDebugMLLog(@"gswdync",@"setDefinitionName1 in %p: %p %@",

View file

@ -95,8 +95,8 @@ RCS_ID("$Id$")
inContext:nil]; inContext:nil];
else else
{ {
LOGSeriousError(@"No data for _key %@", LOGSeriousError(@"No data for key '%@'",
key); aKey);
//TODO //TODO
}; };
LOGObjectFnStop(); LOGObjectFnStop();