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

View File

@@ -31,8 +31,6 @@ namespace CutList.Forms
/// Loads the tool list from the file at ToolsFilePath
/// </summary>
public void Load()
{
try
{
if (!File.Exists(ToolsFilePath))
{
@@ -46,15 +44,8 @@ namespace CutList.Forms
Tools = list;
}
}
catch (Exception ex)
{
throw;
}
}
public void Save()
{
try
{
if (Tools == null)
return;
@@ -62,10 +53,5 @@ namespace CutList.Forms
var json = JsonConvert.SerializeObject(Tools, Formatting.Indented);
File.WriteAllText(ToolsFilePath, json);
}
catch (Exception ex)
{
throw;
}
}
}
}