config parser: more debug output in embedded tests
authorPatrick Ohly <patrick.ohly@intel.com>
Wed, 30 Jul 2014 07:50:23 +0000 (09:50 +0200)
committerPatrick Ohly <patrick.ohly@intel.com>
Wed, 30 Jul 2014 07:50:23 +0000 (09:50 +0200)
When loading valid or invalid config files and getting an error,
print the error as debug output. This is useful to debug the tests
without having to use a interactivedebugger.

bus/config-parser.c

index a6a8e1c..8cdeb4f 100644 (file)
@@ -2818,6 +2818,8 @@ do_load (const DBusString *full_path,
   dbus_error_init (&error);
 
   parser = bus_config_load (full_path, TRUE, NULL, &error);
+  if (dbus_error_is_set (&error))
+    _dbus_verbose ("Failed to load file: %s\n", error.message);
   if (parser == NULL)
     {
       _DBUS_ASSERT_ERROR_IS_SET (&error);