From faef720d9ddc40d8f1121ca31dd294d73defe927 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Sat, 18 Apr 2020 10:52:37 +0200 Subject: [PATCH] In dbus_get_autolaunch_address() return all errors as dbus error This provides a consistent error reporting. Fixes #191 --- dbus/dbus-sysdeps-win.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c index 1f7d0ae29..964d5391e 100644 --- a/dbus/dbus-sysdeps-win.c +++ b/dbus/dbus-sysdeps-win.c @@ -3189,10 +3189,12 @@ _dbus_get_autolaunch_address (const char *scope, DBusString *address, *ext_idx = '\0'; if (!SearchPathA (dbus_module_path, daemon_name, NULL, sizeof(dbus_exe_path), dbus_exe_path, &lpFile)) { - dbus_set_error_const (error, DBUS_ERROR_FAILED, "could not find dbus-daemon executable"); + dbus_set_error (error, DBUS_ERROR_FAILED, + "Could not find dbus-daemon executable. " + "Please add the path to %s to your PATH " + "environment variable or start the daemon manually", + daemon_name); retval = FALSE; - fprintf (stderr, "please add the path to %s to your PATH environment variable\n", daemon_name); - fprintf (stderr, "or start the daemon manually\n\n"); goto out; } _dbus_verbose ("found dbus daemon executable at %s", dbus_module_path); -- 2.47.3