Improve error logging a little

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20030 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2004-09-08 09:13:50 +00:00
parent a0d5bcd374
commit dc6b3fb628
2 changed files with 12 additions and 6 deletions

View file

@ -821,8 +821,8 @@ static NSLock *urlLock = nil;
{
if ([name isEqualToString: GSFileHandleConnectCompletionNotification])
{
NSLog(@"Unable to connect to %@:%@ via socket",
[dHandle socketAddress], [dHandle socketService]);
NSLog(@"Unable to connect to %@:%@ via socket ... %@",
[dHandle socketAddress], [dHandle socketService], e);
}
// NSLog(@"Fail - %@", e);
/*
@ -972,11 +972,14 @@ static NSLock *urlLock = nil;
protocol: @"tcp"];
if (sock == nil)
{
extern int errno;
/*
* Tell superclass that the load failed - let it do housekeeping.
*/
[self backgroundLoadDidFailWithReason: [NSString stringWithFormat:
@"Unable to connect to %@:%@", host, port]];
@"Unable to connect to %@:%@ ... %s",
host, port, GSLastErrorStr(errno)]];
return;
}
cHandle = [[GSTelnetHandle alloc] initWithHandle: sock isConnected: NO];

View file

@ -702,11 +702,14 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
}
if (sock == nil)
{
extern int errno;
/*
* Tell superclass that the load failed - let it do housekeeping.
*/
[self backgroundLoadDidFailWithReason: [NSString stringWithFormat:
@"Unable to connect to %@:%@", host, port]];
@"Unable to connect to %@:%@ ... %s",
host, port, GSLastErrorStr(errno)]];
return;
}
RETAIN(sock);
@ -762,8 +765,8 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
e = [userInfo objectForKey: GSFileHandleNotificationError];
if (e != nil)
{
NSLog(@"Unable to connect to %@:%@ via socket",
[sock socketAddress], [sock socketService]);
NSLog(@"Unable to connect to %@:%@ via socket ... %@",
[sock socketAddress], [sock socketService], e);
/*
* Tell superclass that the load failed - let it do housekeeping.
*/