Commit d93d60e4 authored by Erik Reider's avatar Erik Reider

Log errors with G_LOG_LEVEL_CRITICAL instead of aborting

parent 8610d0c0
......@@ -1058,7 +1058,7 @@ namespace SwayNotificationCenter {
if (write_to_file (path)) {
debug ("Successfully wrote to %s", path);
} else {
error ("ERROR WRITING TO %s", path);
critical ("ERROR WRITING TO %s", path);
}
}
......
......@@ -310,7 +310,7 @@ namespace SwayNotificationCenter {
try {
swaync_daemon.toggle_dnd ();
} catch (Error e) {
error ("Error: %s\n", e.message);
critical ("Error: %s\n", e.message);
}
break;
case "Down":
......
......@@ -34,7 +34,7 @@ namespace SwayNotificationCenter.Widgets {
try {
monitor = fd.monitor (FileMonitorFlags.NONE, null);
} catch (Error e) {
error ("Error %s\n", e.message);
critical ("Error %s\n", e.message);
}
} else {
this.brightness_change (-1);
......@@ -47,7 +47,7 @@ namespace SwayNotificationCenter.Widgets {
login1 = Bus.get_proxy_sync (BusType.SYSTEM,
"org.freedesktop.login1", "/org/freedesktop/login1/session/auto");
} catch (Error e) {
error ("Error %s\n", e.message);
critical ("Error %s\n", e.message);
}
}
......@@ -59,7 +59,7 @@ namespace SwayNotificationCenter.Widgets {
connect_monitor ();
} else {
this.brightness_change (-1);
warning ("Could not find device %s\n", path_current);
critical ("Could not find device %s\n", path_current);
close ();
}
}
......@@ -100,7 +100,7 @@ namespace SwayNotificationCenter.Widgets {
this.brightness_change (int.parse (data));
}
} catch (Error e) {
error ("Error %s\n", e.message);
critical ("Error %s\n", e.message);
}
}
......@@ -111,7 +111,7 @@ namespace SwayNotificationCenter.Widgets {
string data = dis_max.read_line (null);
max = int.parse (data);
} catch (Error e) {
error ("Error %s\n", e.message);
critical ("Error %s\n", e.message);
}
}
......
......@@ -53,7 +53,7 @@ namespace SwayNotificationCenter.Widgets {
try {
swaync_daemon.clear_inhibitors ();
} catch (Error e) {
error ("Error: %s\n", e.message);
critical ("Error: %s\n", e.message);
}
});
clear_all_button.set_can_focus (false);
......
......@@ -134,7 +134,7 @@ namespace SwayNotificationCenter.Widgets.Mpris {
try {
setup_mpris ();
} catch (Error e) {
error ("MPRIS Widget error: %s", e.message);
critical ("MPRIS Widget error: %s", e.message);
}
}
......
......@@ -265,8 +265,8 @@ namespace SwayNotificationCenter.Widgets.Mpris {
stream, album_art_cancellable);
album_art_texture = Gdk.Texture.for_pixbuf (pixbuf);
} catch (Error e) {
debug ("Could not download album art for %s. Using fallback...",
source.media_player.identity);
critical ("Could not download album art for %s. Using fallback... (%s)",
source.media_player.identity, e.message);
}
if (album_art_texture != null) {
// Set album art
......
......@@ -43,7 +43,7 @@ namespace SwayNotificationCenter.Widgets {
try {
swaync_daemon.close_all_notifications ();
} catch (Error e) {
error ("Error: %s\n", e.message);
critical ("Error: %s\n", e.message);
}
});
if (noti_daemon.control_center != null) {
......
......@@ -340,14 +340,14 @@ namespace SwayNotificationCenter {
if (display is Gdk.Wayland.Display) {
return ((Gdk.Wayland.Display) display).get_wl_display ();
}
GLib.error ("Only supports Wayland!");
error ("Only supports Wayland!");
}
public static Wl.Surface * get_wl_surface (Gdk.Surface surface) {
if (surface is Gdk.Wayland.Surface) {
return ((Gdk.Wayland.Surface) surface).get_wl_surface ();
}
GLib.error ("Only supports Wayland!");
error ("Only supports Wayland!");
}
public static double lerp (double a, double b, double t) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment