Harden CLI setting value conversion error handling

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/d53ef12a-695a-4687-bb53-f467c7121aea
This commit is contained in:
copilot-swe-agent[bot] 2026-03-25 12:47:12 +00:00
parent 87593b17b9
commit f405548529

View file

@ -501,7 +501,17 @@ namespace MinecraftClient
converted = Convert.ChangeType(input, effectiveType, CultureInfo.InvariantCulture);
return true;
}
catch
catch (InvalidCastException)
{
converted = null;
return false;
}
catch (FormatException)
{
converted = null;
return false;
}
catch (OverflowException)
{
converted = null;
return false;