This commit is contained in:
John Lewin 2019-04-03 15:03:45 -07:00
parent ce5b17ee8b
commit a0059309b6
4 changed files with 10 additions and 4 deletions

View file

@ -817,6 +817,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
valueAsVector2.X = Helpers.ParseDouble(twoValues[0]);
valueAsVector2.Y = Helpers.ParseDouble(twoValues[1]);
}
return (T)(object)(valueAsVector2);
}
else if(typeof(T) == typeof(Vector3))

View file

@ -83,10 +83,12 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
internal double ParseDouble(string firstLayerValueString)
{
double firstLayerValue;
if (!double.TryParse(firstLayerValueString, out firstLayerValue))
{
throw new Exception(string.Format("Format cannot be parsed. FirstLayerHeight '{0}'", firstLayerValueString));
}
return firstLayerValue;
}