Skip to content

Commit

Permalink
LogBrowse: use int.TryParse instead of int.Parse
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsuy authored and meee1 committed Feb 15, 2023
1 parent 63c0e01 commit 9f339ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Log/LogBrowse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,8 @@ void graphit_clickprocess(bool left = true)
{
log.InfoFormat("GraphItem: {0} {1} {2}", type, fieldname, instance);
DataModifer dataModifier = new DataModifer();
string nodeName = DataModifer.GetNodeName(type, instance != "" ? int.Parse(instance) : -1, fieldname);
int instance_int;
string nodeName = DataModifer.GetNodeName(type, int.TryParse(instance, out instance_int) ? instance_int : -1, fieldname);

foreach (var curve in zg1.GraphPane.CurveList)
{
Expand Down

0 comments on commit 9f339ff

Please sign in to comment.