From bf4bbfe16d7d676d56cb9ed661684b17318d333f Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 1 Feb 2016 03:58:03 +0100 Subject: [PATCH] Better async error reporting * process.c (connect_network_socket): Mark failed processes with a better error message. (check_for_dns): Ditto. --- src/process.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/process.c b/src/process.c index 8849b20172f..b6721ada607 100644 --- a/src/process.c +++ b/src/process.c @@ -3311,8 +3311,12 @@ void connect_network_socket (Lisp_Object proc, Lisp_Object ip_addresses) p->gnutls_boot_parameters = Qnil; boot = Fgnutls_boot (proc, XCAR (params), XCDR (params)); if (NILP (boot) || STRINGP (boot)) { - pset_status (p, Qfailed); deactivate_process (proc); + if (NILP (boot)) + pset_status (p, list2 (Qfailed, + build_string ("TLS negotiation failed"))); + else + pset_status (p, list2 (Qfailed, boot)); } } #endif @@ -4614,8 +4618,12 @@ check_for_dns (Lisp_Object proc) /* The DNS lookup failed. */ else { - pset_status (p, Qfailed); deactivate_process (proc); + pset_status (p, (list2 + (Qfailed, + concat3 (build_string ("Name lookup of "), + build_string (p->dns_requests[0]->ar_name), + build_string (" failed"))))); } xfree ((void *)p->dns_requests[0]->ar_request); -- 2.39.5