[epiphany/mcatanzaro/app-mode-fixes] web-app-utils: crash better when EphyWebApplication creation fails



commit ee904deeb23c9819d8684aa394588725f1a260d8
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Thu Mar 26 14:43:37 2020 -0500

    web-app-utils: crash better when EphyWebApplication creation fails
    
    This is always going to be fatal, but it's better to crash in a
    controlled way.

 lib/ephy-web-app-utils.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/lib/ephy-web-app-utils.c b/lib/ephy-web-app-utils.c
index 10b30ae20..07d89c930 100644
--- a/lib/ephy-web-app-utils.c
+++ b/lib/ephy-web-app-utils.c
@@ -548,7 +548,7 @@ ephy_web_application_for_profile_directory (const char *profile_dir)
 
   id = get_app_id_from_profile_directory (profile_dir);
   if (!id)
-    return NULL;
+    g_error ("Cannot create EphyWebApplication: failed to get app ID from profile directory %s", 
profile_dir);
 
   app = g_new0 (EphyWebApplication, 1);
   app->id = g_strdup (id);
@@ -559,7 +559,7 @@ ephy_web_application_for_profile_directory (const char *profile_dir)
   if (!desktop_info) {
     ephy_web_application_free (app);
     g_free (desktop_file_path);
-    return NULL;
+    g_error ("Cannot create EphyWebApplication: failed to create GDesktopAppInfo from desktop file %s", 
desktop_file_path);
   }
 
   app->name = g_strdup (g_app_info_get_name (G_APP_INFO (desktop_info)));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]