From 51e9d92f4ea4fb66e96bdcae075bd48cb7b1feb7 Mon Sep 17 00:00:00 2001 From: Romain Vigier Date: Sun, 30 Oct 2022 12:25:38 +0100 Subject: [PATCH] Extension: Print actual error in the console --- src/modules/Timer.js | 4 ++-- src/preferences/BackgroundButton.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/Timer.js b/src/modules/Timer.js index 7b69a67..d2d9a06 100644 --- a/src/modules/Timer.js +++ b/src/modules/Timer.js @@ -253,10 +253,10 @@ var Timer = class extends GObject.Object { } catch (e) { const [latitude, longitude] = this.#settings.get_value('location').deepUnpack(); if (latitude >= -90 && latitude <= 90 && longitude >= -180 && longitude <= 180) { - console.error(`[${Me.metadata.name}] Unable to retrieve the location, using the last known location instead.`); + console.error(`[${Me.metadata.name}] Unable to retrieve the location, using the last known location instead.\n${e}`); this.#updateSuntimes(); } else { - console.error(`[${Me.metadata.name}] Unable to retrieve the location, using the manual schedule times instead.`); + console.error(`[${Me.metadata.name}] Unable to retrieve the location, using the manual schedule times instead.\n${e}`); } } } diff --git a/src/preferences/BackgroundButton.js b/src/preferences/BackgroundButton.js index e6a835b..5aee205 100644 --- a/src/preferences/BackgroundButton.js +++ b/src/preferences/BackgroundButton.js @@ -151,7 +151,7 @@ var BackgroundButton = GObject.registerClass({ if (!this.#isContentTypeSupported(Gio.content_type_guess(path, null)[0])) throw new Error(); } catch (e) { - console.error(`[${Me.metadata.name}] No suitable background file found in ${file.get_path()}`); + console.error(`[${Me.metadata.name}] No suitable background file found in ${file.get_path()}.\n${e}`); return; } } else {