Skip to content

Commit

Permalink
Adding else condition for empty sensor_identifier. Adding message box…
Browse files Browse the repository at this point in the history
… for YAML load errors.
  • Loading branch information
SasaKaranovic committed Jan 18, 2024
1 parent 80fb59b commit 30a5835
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions VU1WPF/ClassConfigurationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ public bool UpdateDialConfig(ClassDialGUI sensor, bool saveAfter)
{
dial.sensor_identifier = sensor.Sensor.Identifier.ToString();
}
else
{
dial.sensor_identifier = "";
}

}
else
Expand Down Expand Up @@ -268,6 +272,8 @@ private void LoadConfigFile()
catch (Exception e)
{
Trace.WriteLine(e, "YAML read process failed.");
MessageBox.Show(e.ToString(), "YAML read process failed.", MessageBoxButton.OK, MessageBoxImage.Warning);

return;
}

Expand Down

0 comments on commit 30a5835

Please sign in to comment.