Extension: Print actual error in the console

This commit is contained in:
Romain Vigier
2022-10-30 13:02:31 +01:00
parent ea53f9dbca
commit 51e9d92f4e
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -253,10 +253,10 @@ var Timer = class extends GObject.Object {
} catch (e) { } catch (e) {
const [latitude, longitude] = this.#settings.get_value('location').deepUnpack(); const [latitude, longitude] = this.#settings.get_value('location').deepUnpack();
if (latitude >= -90 && latitude <= 90 && longitude >= -180 && longitude <= 180) { 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(); this.#updateSuntimes();
} else { } 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}`);
} }
} }
} }
+1 -1
View File
@@ -151,7 +151,7 @@ var BackgroundButton = GObject.registerClass({
if (!this.#isContentTypeSupported(Gio.content_type_guess(path, null)[0])) if (!this.#isContentTypeSupported(Gio.content_type_guess(path, null)[0]))
throw new Error(); throw new Error();
} catch (e) { } 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; return;
} }
} else { } else {