mirror of
https://github.com/MistWeatherMedia/i2ME.git
synced 2026-11-28 22:30:55 -08:00
Wrap location ID parsing in a try/catch block
This commit is contained in:
1 parent
e906cd8f3e
commit
73574afb71
1 file changed
+14
-5
+14
-5
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user