diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-07-10 15:02:52 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-07-10 15:02:52 +0000 |
commit | ae67f423832e11fc0276df528c17bf879f96171a (patch) | |
tree | 9ab49331cf3f4897e8e9ebcc8b359a8eeada8e51 | |
parent | 496b49d6cf1ea45efcacf9e9742ce3e24983ded7 (diff) | |
download | fetchmail-ae67f423832e11fc0276df528c17bf879f96171a.tar.gz fetchmail-ae67f423832e11fc0276df528c17bf879f96171a.tar.bz2 fetchmail-ae67f423832e11fc0276df528c17bf879f96171a.zip |
Improve the error messages.
svn path=/trunk/; revision=1167
-rw-r--r-- | driver.c | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -1264,7 +1264,22 @@ const struct method *proto; /* protocol method table */ #define EHOSTUNREACH (-1) #endif if (outlevel == O_VERBOSE || errno != EHOSTUNREACH) - error(0, errno, "connecting to host"); + { + error_build("fetchmail: %s connection to %s failed: ", + protocol->name, ctl->server.names->id); + if (h_errno == HOST_NOT_FOUND) + error_complete(0, 0, "host is unknown"); + else if (h_errno == NO_ADDRESS) + error_complete(0, 0, "name is valid but has no IP address"); + else if (h_errno == NO_RECOVERY) + error_complete(0, 0, "unrecoverable name server error"); + else if (h_errno == TRY_AGAIN) + error_complete(0, 0, "temporary name server error"); + else if (h_errno) + error_complete(0, 0, "unknown DNS error %d", h_errno); + else + error_complete(0, errno, "local error"); + } ok = PS_SOCKET; goto closeUp; } |