Wrap location ID parsing in a try/catch block

This commit is contained in:
April P. committed 2024-12-29 05:33:27 -08:00
1 parent e906cd8f3e
commit 73574afb71
1 file changed
+14 -5
+14 -5
View File
@@ -1,4 +1,5 @@
using System.Xml.Serialization;
using System.Data.SQLite;
using System.Xml.Serialization;
using MistWX_i2Me;
using MistWX_i2Me.API;
using MistWX_i2Me.API.Products;
@@ -125,10 +126,18 @@ public class Program
{
continue;
}
string choppedValue = i.Value.ToString().Split("1_US_")[1];
locations.Add(choppedValue);
try
{
string choppedValue = i.Value.ToString().Split("1_US_")[1];
locations.Add(choppedValue);
}
catch (Exception ex)
{
continue;
}
}
}