added a NSLog and then raise the exception to make debugging easier

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@20407 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
dwetzel 2004-12-01 15:01:20 +00:00
parent e371500882
commit 9cd2739ed5

View file

@ -410,8 +410,12 @@ static __inline__ NSMutableData *_checkBody(GSWMessage *self) {
myData = [aValue dataUsingEncoding:_contentEncoding
allowLossyConversion:NO];
NSAssert2(myData,@"(%s): could not convert string non-lossy to encoding %i",
__PRETTY_FUNCTION__, _contentEncoding);
if (!myData) {
NSLog(aValue);
[NSException raise:NSInvalidArgumentException
format:@"%s: could not convert '%s' non-lossy to encoding %i",
__PRETTY_FUNCTION__, [aValue lossyCString],_contentEncoding];
}
// [self appendContentData: myData];
_checkBody(self);