From 01aa2cbb98539c0c816f53646f9ebca3e6948ede Mon Sep 17 00:00:00 2001 From: Cody Fields Date: Wed, 9 Dec 2020 10:34:56 -0500 Subject: [PATCH] Add error print out, ready for Windows release --- src/js/script.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/js/script.js b/src/js/script.js index 5f1b391..dd261c7 100644 --- a/src/js/script.js +++ b/src/js/script.js @@ -128,7 +128,7 @@ window.addEventListener("DOMContentLoaded", (e) => { settings.set("remindUpdate", false); } }).catch(err => { - console.log("Something went wrong."); + console.log("Something went wrong: " + err); }); } } @@ -165,7 +165,7 @@ window.addEventListener("DOMContentLoaded", (e) => { // Validate that we have read/write access to the users Garrysmod directory so we can use gmad & gmpublish document.getElementById("gmod_dir_folder").addEventListener("click", () => { dialog.showOpenDialog(win, dirDialogOptions).then(result => { - var filePath = result.filePaths[0] + var filePath = result.filePaths[0]; var desName = filePath.substring(filePath.length - 9, filePath.length); if (filePath != null) { // Checks to see if directory user selects contains gmad.exe & gmpublish.exe @@ -192,7 +192,7 @@ window.addEventListener("DOMContentLoaded", (e) => { } } }).catch(err => { - console.error("Dailog failed to open!"); + console.error("Something went wrong: " + err); }); }); @@ -496,7 +496,7 @@ window.addEventListener("DOMContentLoaded", (e) => { } } }).catch(err => { - console.error("Dailog failed to open!"); + console.error("Something went wrong: " + err); }) }); @@ -526,7 +526,7 @@ window.addEventListener("DOMContentLoaded", (e) => { errorNote("Doesn't seem like a JPEG image.", false, false); } }).catch(err => { - console.error("Dailog failed to open!"); + console.error("Something went wrong: " + err); }); }); @@ -800,7 +800,7 @@ window.addEventListener("DOMContentLoaded", (e) => { document.querySelector("#addon_extract_next button").style.backgroundColor = "#56bd56"; document.querySelector("#addon_extract_next button").style.cursor = "pointer"; } - }).catch(err => { console.error("Dailog failed to open!", err) }); + }).catch(err => { console.error("Something went wrong: " + err) }); }); document.querySelector("#addon_extract_next button").addEventListener("click", () => {