From 1c0efaf84faa3d0be740f1a7a82735620b0be6e9 Mon Sep 17 00:00:00 2001 From: Bitl Date: Sat, 4 Jul 2020 17:10:36 -0700 Subject: [PATCH] removed debugging exeption for exceptions --- NovetusLauncher/NovetusFuncs/ClientScript.cs | 4 ++-- NovetusLauncher/NovetusFuncs/IniFile.cs | 2 +- NovetusLauncher/NovetusFuncs/SecurityFuncs.cs | 2 +- NovetusLauncher/NovetusFuncs/SplashReader.cs | 4 ++-- NovetusLauncher/NovetusFuncs/TreeNodeHelper.cs | 2 +- NovetusLauncher/NovetusFuncs/WebServer.cs | 4 ++-- .../CharacterCustomization/CharacterCustomization.cs | 10 +++++----- .../CharacterCustomization_legacy.cs | 10 +++++----- NovetusLauncher/NovetusLauncher/MainForm/MainForm.cs | 2 +- .../NovetusLauncher/MainForm/MainForm_legacy.cs | 2 +- NovetusLauncher/NovetusLauncher/SDK/AssetLocalizer.cs | 2 +- NovetusLauncher/NovetusURI/URI/LoaderForm.cs | 2 +- 12 files changed, 23 insertions(+), 23 deletions(-) diff --git a/NovetusLauncher/NovetusFuncs/ClientScript.cs b/NovetusLauncher/NovetusFuncs/ClientScript.cs index a849189..1d4a02f 100644 --- a/NovetusLauncher/NovetusFuncs/ClientScript.cs +++ b/NovetusLauncher/NovetusFuncs/ClientScript.cs @@ -22,7 +22,7 @@ public class ClientScript string result = code.Substring(pFrom, pTo - pFrom); return result; } - catch (Exception) when (!Env.Debugging) + catch (Exception) { return "%donothing%"; } @@ -114,7 +114,7 @@ public class ClientScript } else { return source; } - } catch (Exception) when (!Env.Debugging) { + } catch (Exception) { return source; } } diff --git a/NovetusLauncher/NovetusFuncs/IniFile.cs b/NovetusLauncher/NovetusFuncs/IniFile.cs index 048dbda..5ca9f5d 100644 --- a/NovetusLauncher/NovetusFuncs/IniFile.cs +++ b/NovetusLauncher/NovetusFuncs/IniFile.cs @@ -63,7 +63,7 @@ public class IniFile return temp.ToString(); } catch (Exception) - { + { IniWriteValue(Section, Key, DefaultValue); return IniReadValue(Section, Key); } diff --git a/NovetusLauncher/NovetusFuncs/SecurityFuncs.cs b/NovetusLauncher/NovetusFuncs/SecurityFuncs.cs index 82993e9..8f32db9 100644 --- a/NovetusLauncher/NovetusFuncs/SecurityFuncs.cs +++ b/NovetusLauncher/NovetusFuncs/SecurityFuncs.cs @@ -247,7 +247,7 @@ public class SecurityFuncs string[] a3 = a2.Split('<'); ipAddress = a3[0]; } - catch (Exception) when (!Env.Debugging) + catch (Exception) { ipAddress = "localhost"; } diff --git a/NovetusLauncher/NovetusFuncs/SplashReader.cs b/NovetusLauncher/NovetusFuncs/SplashReader.cs index 23e950b..c667cbe 100644 --- a/NovetusLauncher/NovetusFuncs/SplashReader.cs +++ b/NovetusLauncher/NovetusFuncs/SplashReader.cs @@ -19,10 +19,10 @@ public static class SplashReader try { splash = splashes[new CryptoRandom().Next(0, splashes.Length - 1)]; - } catch (Exception) when (!Env.Debugging) { + } catch (Exception) { try { splash = splashes[0]; - } catch (Exception) when (!Env.Debugging) { + } catch (Exception) { splash = "missingno"; return splash; } diff --git a/NovetusLauncher/NovetusFuncs/TreeNodeHelper.cs b/NovetusLauncher/NovetusFuncs/TreeNodeHelper.cs index 37a4821..611d588 100644 --- a/NovetusLauncher/NovetusFuncs/TreeNodeHelper.cs +++ b/NovetusLauncher/NovetusFuncs/TreeNodeHelper.cs @@ -61,7 +61,7 @@ public static class TreeNodeHelper } else { return ""; } - } catch (Exception) when (!Env.Debugging) { + } catch (Exception) { return ""; } } diff --git a/NovetusLauncher/NovetusFuncs/WebServer.cs b/NovetusLauncher/NovetusFuncs/WebServer.cs index bf8918d..cba7f37 100644 --- a/NovetusLauncher/NovetusFuncs/WebServer.cs +++ b/NovetusLauncher/NovetusFuncs/WebServer.cs @@ -149,7 +149,7 @@ public class SimpleHTTPServer try { HttpListenerContext context = _listener.GetContext(); Process(context); - } catch (Exception) when (!Env.Debugging) { + } catch (Exception) { } } @@ -221,7 +221,7 @@ public class SimpleHTTPServer context.Response.StatusCode = (int)HttpStatusCode.OK; context.Response.OutputStream.Flush(); } - } catch (Exception) when (!Env.Debugging) { + } catch (Exception) { context.Response.StatusCode = (int)HttpStatusCode.InternalServerError; } diff --git a/NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization.cs b/NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization.cs index d11e554..a51a140 100644 --- a/NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization.cs +++ b/NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization.cs @@ -227,7 +227,7 @@ namespace NovetusLauncher Image icon1 = LauncherFuncs.LoadImage(GlobalVars.extradirIcons + "\\" + GlobalVars.PlayerName + ".png"); pictureBox10.Image = icon1; } - catch (Exception) when (!Env.Debugging) + catch (Exception) { Image icon1 = LauncherFuncs.LoadImage(GlobalVars.extradir + "\\NoExtra.png"); pictureBox10.Image = icon1; @@ -584,7 +584,7 @@ namespace NovetusLauncher textBox10.Text = GlobalVars.Custom_Extra; } } - catch (Exception) when (!Env.Debugging) + catch (Exception) { if (Directory.Exists(GlobalVars.hatdir)) { @@ -1681,7 +1681,7 @@ namespace NovetusLauncher textBox10.Text = GlobalVars.Custom_Extra; } } - catch (Exception) when (!Env.Debugging) + catch (Exception) { if (Directory.Exists(GlobalVars.hatdir)) { @@ -1712,7 +1712,7 @@ namespace NovetusLauncher { icon.LoadImage(); } - catch (Exception) when (!Env.Debugging) + catch (Exception) { } @@ -1726,7 +1726,7 @@ namespace NovetusLauncher Image icon1 = LauncherFuncs.LoadImage(GlobalVars.extradirIcons + "\\" + GlobalVars.PlayerName + ".png"); pictureBox10.Image = icon1; } - catch (Exception) when (!Env.Debugging) + catch (Exception) { Image icon1 = LauncherFuncs.LoadImage(GlobalVars.extradir + "\\NoExtra.png"); pictureBox10.Image = icon1; diff --git a/NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.cs b/NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.cs index ac165bc..f34691a 100644 --- a/NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.cs +++ b/NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.cs @@ -223,7 +223,7 @@ namespace NovetusLauncher Image icon1 = LauncherFuncs.LoadImage(GlobalVars.extradirIcons + "\\" + GlobalVars.PlayerName + ".png"); pictureBox10.Image = icon1; } - catch (Exception) when (!Env.Debugging) + catch (Exception) { Image icon1 = LauncherFuncs.LoadImage(GlobalVars.extradir + "\\NoExtra.png"); pictureBox10.Image = icon1; @@ -576,7 +576,7 @@ namespace NovetusLauncher textBox10.Text = GlobalVars.Custom_Extra; } } - catch (Exception) when (!Env.Debugging) + catch (Exception) { if (Directory.Exists(GlobalVars.hatdir)) { @@ -1673,7 +1673,7 @@ namespace NovetusLauncher textBox10.Text = GlobalVars.Custom_Extra; } } - catch (Exception) when (!Env.Debugging) + catch (Exception) { if (Directory.Exists(GlobalVars.hatdir)) { @@ -1704,7 +1704,7 @@ namespace NovetusLauncher { icon.LoadImage(); } - catch (Exception) when (!Env.Debugging) + catch (Exception) { } @@ -1718,7 +1718,7 @@ namespace NovetusLauncher Image icon1 = LauncherFuncs.LoadImage(GlobalVars.extradirIcons + "\\" + GlobalVars.PlayerName + ".png"); pictureBox10.Image = icon1; } - catch (Exception) when (!Env.Debugging) + catch (Exception) { Image icon1 = LauncherFuncs.LoadImage(GlobalVars.extradir + "\\NoExtra.png"); pictureBox10.Image = icon1; diff --git a/NovetusLauncher/NovetusLauncher/MainForm/MainForm.cs b/NovetusLauncher/NovetusLauncher/MainForm/MainForm.cs index 1b57876..5e3ac9c 100644 --- a/NovetusLauncher/NovetusLauncher/MainForm/MainForm.cs +++ b/NovetusLauncher/NovetusLauncher/MainForm/MainForm.cs @@ -1407,7 +1407,7 @@ namespace NovetusLauncher ConsolePrint("AddonLoader - " + addon.getInstallOutcome(), 3); } } - catch (Exception) when (!Env.Debugging) + catch (Exception) { if (!string.IsNullOrWhiteSpace(addon.getInstallOutcome())) { diff --git a/NovetusLauncher/NovetusLauncher/MainForm/MainForm_legacy.cs b/NovetusLauncher/NovetusLauncher/MainForm/MainForm_legacy.cs index 2ca30ea..f8fca71 100644 --- a/NovetusLauncher/NovetusLauncher/MainForm/MainForm_legacy.cs +++ b/NovetusLauncher/NovetusLauncher/MainForm/MainForm_legacy.cs @@ -1372,7 +1372,7 @@ namespace NovetusLauncher ConsolePrint("AddonLoader - " + addon.getInstallOutcome(), 3); } } - catch (Exception) when (!Env.Debugging) + catch (Exception) { if (!string.IsNullOrWhiteSpace(addon.getInstallOutcome())) { diff --git a/NovetusLauncher/NovetusLauncher/SDK/AssetLocalizer.cs b/NovetusLauncher/NovetusLauncher/SDK/AssetLocalizer.cs index 64661d1..4c2caba 100644 --- a/NovetusLauncher/NovetusLauncher/SDK/AssetLocalizer.cs +++ b/NovetusLauncher/NovetusLauncher/SDK/AssetLocalizer.cs @@ -293,7 +293,7 @@ namespace NovetusLauncher worker.ReportProgress(0); File.Copy(path, path.Replace(".rbxl", " BAK.rbxl")); } - catch (Exception) when (!Env.Debugging) + catch (Exception) { worker.ReportProgress(100); } diff --git a/NovetusLauncher/NovetusURI/URI/LoaderForm.cs b/NovetusLauncher/NovetusURI/URI/LoaderForm.cs index c854219..6470a94 100644 --- a/NovetusLauncher/NovetusURI/URI/LoaderForm.cs +++ b/NovetusLauncher/NovetusURI/URI/LoaderForm.cs @@ -162,7 +162,7 @@ namespace NovetusURI LaunchClient(rbxexe,args); } } - catch (Exception) when (!Env.Debugging) + catch (Exception) { label1.Text = "The client has been detected as modified."; }