mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
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:
parent
b4a622cede
commit
8b9685f81f
2 changed files with 12 additions and 6 deletions
|
@ -821,8 +821,8 @@ static NSLock *urlLock = nil;
|
||||||
{
|
{
|
||||||
if ([name isEqualToString: GSFileHandleConnectCompletionNotification])
|
if ([name isEqualToString: GSFileHandleConnectCompletionNotification])
|
||||||
{
|
{
|
||||||
NSLog(@"Unable to connect to %@:%@ via socket",
|
NSLog(@"Unable to connect to %@:%@ via socket ... %@",
|
||||||
[dHandle socketAddress], [dHandle socketService]);
|
[dHandle socketAddress], [dHandle socketService], e);
|
||||||
}
|
}
|
||||||
// NSLog(@"Fail - %@", e);
|
// NSLog(@"Fail - %@", e);
|
||||||
/*
|
/*
|
||||||
|
@ -972,11 +972,14 @@ static NSLock *urlLock = nil;
|
||||||
protocol: @"tcp"];
|
protocol: @"tcp"];
|
||||||
if (sock == nil)
|
if (sock == nil)
|
||||||
{
|
{
|
||||||
|
extern int errno;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Tell superclass that the load failed - let it do housekeeping.
|
* Tell superclass that the load failed - let it do housekeeping.
|
||||||
*/
|
*/
|
||||||
[self backgroundLoadDidFailWithReason: [NSString stringWithFormat:
|
[self backgroundLoadDidFailWithReason: [NSString stringWithFormat:
|
||||||
@"Unable to connect to %@:%@", host, port]];
|
@"Unable to connect to %@:%@ ... %s",
|
||||||
|
host, port, GSLastErrorStr(errno)]];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cHandle = [[GSTelnetHandle alloc] initWithHandle: sock isConnected: NO];
|
cHandle = [[GSTelnetHandle alloc] initWithHandle: sock isConnected: NO];
|
||||||
|
|
|
@ -702,11 +702,14 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
|
||||||
}
|
}
|
||||||
if (sock == nil)
|
if (sock == nil)
|
||||||
{
|
{
|
||||||
|
extern int errno;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Tell superclass that the load failed - let it do housekeeping.
|
* Tell superclass that the load failed - let it do housekeeping.
|
||||||
*/
|
*/
|
||||||
[self backgroundLoadDidFailWithReason: [NSString stringWithFormat:
|
[self backgroundLoadDidFailWithReason: [NSString stringWithFormat:
|
||||||
@"Unable to connect to %@:%@", host, port]];
|
@"Unable to connect to %@:%@ ... %s",
|
||||||
|
host, port, GSLastErrorStr(errno)]];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
RETAIN(sock);
|
RETAIN(sock);
|
||||||
|
@ -762,8 +765,8 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
|
||||||
e = [userInfo objectForKey: GSFileHandleNotificationError];
|
e = [userInfo objectForKey: GSFileHandleNotificationError];
|
||||||
if (e != nil)
|
if (e != nil)
|
||||||
{
|
{
|
||||||
NSLog(@"Unable to connect to %@:%@ via socket",
|
NSLog(@"Unable to connect to %@:%@ via socket ... %@",
|
||||||
[sock socketAddress], [sock socketService]);
|
[sock socketAddress], [sock socketService], e);
|
||||||
/*
|
/*
|
||||||
* Tell superclass that the load failed - let it do housekeeping.
|
* Tell superclass that the load failed - let it do housekeeping.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue