mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-15 04:35:00 +00:00
fix: Workaround for logged XML format exceptions when failing to parse floats
This commit is contained in:
@@ -177,26 +177,16 @@ namespace ICD.Common.Utils.Xml
|
||||
|
||||
public long ReadElementContentAsLong()
|
||||
{
|
||||
try
|
||||
{
|
||||
return m_Reader.ReadElementContentAsLong();
|
||||
}
|
||||
catch (XmlException e)
|
||||
{
|
||||
throw new IcdXmlException(e);
|
||||
}
|
||||
// ReadElementContentAsLong() logs and throws...
|
||||
string value = ReadElementContentAsString();
|
||||
return long.Parse(value);
|
||||
}
|
||||
|
||||
public float ReadElementContentAsFloat()
|
||||
{
|
||||
try
|
||||
{
|
||||
return m_Reader.ReadElementContentAsFloat();
|
||||
}
|
||||
catch (XmlException e)
|
||||
{
|
||||
throw new IcdXmlException(e);
|
||||
}
|
||||
// ReadElementContentAsFloat() logs and throws...
|
||||
string value = ReadElementContentAsString();
|
||||
return float.Parse(value);
|
||||
}
|
||||
|
||||
public bool ReadElementContentAsBoolean()
|
||||
|
||||
Reference in New Issue
Block a user