Remove useless catch-and-rethrow blocks in Toolbox

Remove empty catch-and-rethrow blocks in Load() and Save() methods
that were catching exceptions only to rethrow them without adding
any value. This improves code clarity and exception propagation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
AJ
2025-11-18 16:02:36 -05:00
parent ee7275ac4f
commit 2c6fe924e5
-14
View File
@@ -31,8 +31,6 @@ namespace CutList.Forms
/// Loads the tool list from the file at ToolsFilePath /// Loads the tool list from the file at ToolsFilePath
/// </summary> /// </summary>
public void Load() public void Load()
{
try
{ {
if (!File.Exists(ToolsFilePath)) if (!File.Exists(ToolsFilePath))
{ {
@@ -46,15 +44,8 @@ namespace CutList.Forms
Tools = list; Tools = list;
} }
} }
catch (Exception ex)
{
throw;
}
}
public void Save() public void Save()
{
try
{ {
if (Tools == null) if (Tools == null)
return; return;
@@ -62,10 +53,5 @@ namespace CutList.Forms
var json = JsonConvert.SerializeObject(Tools, Formatting.Indented); var json = JsonConvert.SerializeObject(Tools, Formatting.Indented);
File.WriteAllText(ToolsFilePath, json); File.WriteAllText(ToolsFilePath, json);
} }
catch (Exception ex)
{
throw;
}
}
} }
} }