Merge pull request #2514 from Owain94/configpanelnumberformatexception
configpanel: Catch NumberFormatException
This commit is contained in:
@@ -589,7 +589,15 @@ class ConfigPanel extends PluginPanel
|
|||||||
|
|
||||||
if (cid.getType() == int.class)
|
if (cid.getType() == int.class)
|
||||||
{
|
{
|
||||||
int value = Integer.parseInt(configManager.getConfiguration(cd.getGroup().value(), cid.getItem().keyName()));
|
int value;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
value = Integer.parseInt(configManager.getConfiguration(cd.getGroup().value(), cid.getItem().keyName()));
|
||||||
|
}
|
||||||
|
catch (NumberFormatException ex)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Units units = cid.getUnits();
|
Units units = cid.getUnits();
|
||||||
Range range = cid.getRange();
|
Range range = cid.getRange();
|
||||||
|
|||||||
Reference in New Issue
Block a user