Browse Source

[Pal] Show file name on config file error

When pal hit error in config file, show the file name for user.
Sometimes it's difficult to identify corresponding config file
when fork/exec are involved.

Signed-off-by: Isaku Yamahata <isaku.yamahata@gmail.com>
Isaku Yamahata 6 years ago
parent
commit
0849296a02
1 changed files with 4 additions and 1 deletions
  1. 4 1
      Pal/src/db_main.c

+ 4 - 1
Pal/src/db_main.c

@@ -337,8 +337,11 @@ has_manifest:
         root_config->free = free;
 
         const char * errstring = NULL;
-        if ((ret = read_config(root_config, loader_filter, &errstring)) < 0)
+        if ((ret = read_config(root_config, loader_filter, &errstring)) < 0) {
+            if (_DkStreamGetName(manifest_handle, uri_buf, URI_MAX) > 0)
+                printf("reading manifest \"%s\" failed\n", uri_buf);
             init_fail(-ret, errstring);
+        }
 
         pal_state.root_config = root_config;