Index: Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/DistributionHelper.cs =================================================================== diff -u -r16655233702d8d9b12e8618a6b40acabe27aa1a7 -r08f1dc11ba73edce36d5133f1382c915bf4edec9 --- Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/DistributionHelper.cs (.../DistributionHelper.cs) (revision 16655233702d8d9b12e8618a6b40acabe27aa1a7) +++ Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/DistributionHelper.cs (.../DistributionHelper.cs) (revision 08f1dc11ba73edce36d5133f1382c915bf4edec9) @@ -38,32 +38,21 @@ /// /// The distribution type. /// The value of the shift. - /// The name of the parameter to be validated. - /// Thrown when - /// is null. /// Thrown when the parameter is not a /// log normal distribution with a zero shift. - public static void ValidateLogNormalDistribution(long? distributionType, double shift, string parameterName) + public static void ValidateLogNormalDistribution(long? distributionType, double shift) { - if (parameterName == null) - { - throw new ArgumentNullException(nameof(parameterName)); - } - + if (distributionType.HasValue) { if (distributionType.Value != SoilLayerConstants.LogNormalDistributionValue) { - throw new DistributionValidationException(string.Format( - Resources.Stochastic_parameter_0_must_be_a_lognormal_distribution, - parameterName)); + throw new DistributionValidationException(Resources.StochasticDistribution_must_be_a_lognormal_distribution); } if (Math.Abs(shift) > tolerance) { - throw new DistributionValidationException(string.Format( - Resources.Stochastic_parameter_0_must_be_a_lognormal_distribution_with_zero_shift, - parameterName)); + throw new DistributionValidationException(Resources.StochasticDistribution_must_be_a_lognormal_distribution_with_zero_shift); } } } @@ -72,23 +61,13 @@ /// Validates that the distribution is a shifted log normal distribution. /// /// The distribution type. - /// The name of the parameter to be validated. - /// Thrown when - /// is null. /// Thrown when the parameter is not a /// log normal distribution. - public static void ValidateShiftedLogNormalDistribution(long? distributionType, string parameterName) + public static void ValidateShiftedLogNormalDistribution(long? distributionType) { - if (parameterName == null) - { - throw new ArgumentNullException(nameof(parameterName)); - } - if (distributionType.HasValue && distributionType != SoilLayerConstants.LogNormalDistributionValue) { - throw new DistributionValidationException(string.Format( - Resources.Stochastic_parameter_0_has_no_shifted_lognormal_distribution, - parameterName)); + throw new DistributionValidationException(Resources.StochasticDistribution_has_no_shifted_lognormal_distribution); } } }