Skip to content

Commit

Permalink
[Add] logging statements and remove TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
samatrhea committed Apr 14, 2024
1 parent 0ac96bf commit 47d169e
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ namespace DEHReqIF.MappingRules.ParameterTypes

using ReqIFSharp;

using NLog;

/// <summary>
/// The purpose of the <see cref="ScalarParameterTypeMappingRule"/> is to transform a <see cref="ScalarParameterType"/> to
/// a <see cref="DatatypeDefinition"/>
Expand All @@ -38,6 +40,11 @@ namespace DEHReqIF.MappingRules.ParameterTypes
/// </remarks>
public class ScalarParameterTypeMappingRule : MappingRule<ScalarParameterType, DatatypeDefinition>
{
/// <summary>
/// The <see cref="NLog"/> logger
/// </summary>
private static readonly Logger logger = LogManager.GetCurrentClassLogger();

/// <summary>
/// Transforms <see cref="ScalarParameterType"/> to a <see cref="DatatypeDefinition"/>
/// </summary>
Expand Down Expand Up @@ -251,7 +258,7 @@ private DatatypeDefinitionInteger TransformQuantityKindToDatatypeDefinitionInteg
}
else
{
// TODO: log error
logger.Warn("The MeasurementScale.MaximumPermissibleValue could not be parsed");
}

if (long.TryParse(measurementScale.MinimumPermissibleValue, out long minValue))
Expand All @@ -260,7 +267,7 @@ private DatatypeDefinitionInteger TransformQuantityKindToDatatypeDefinitionInteg
}
else
{
// TODO: log error
logger.Warn("The MeasurementScale.MinimumPermissibleValue could not be parsed");
}

this.UpdateDescription(datatypeDefinitionInteger, quantityKind);
Expand Down Expand Up @@ -298,7 +305,7 @@ private DatatypeDefinitionReal TransformQuantityKindToDatatypeDefinitionReal(Qua
}
else
{
// TODO: log error
logger.Warn("The MeasurementScale.MaximumPermissibleValue could not be parsed");
}

if (double.TryParse(measurementScale.MinimumPermissibleValue, out double minValue))
Expand All @@ -307,7 +314,7 @@ private DatatypeDefinitionReal TransformQuantityKindToDatatypeDefinitionReal(Qua
}
else
{
// TODO: log error
logger.Warn("The MeasurementScale.MinimumPermissibleValue could not be parsed");
}

this.UpdateDescription(datatypeDefinitionReal, quantityKind);
Expand Down

0 comments on commit 47d169e

Please sign in to comment.