Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/Common.cs =================================================================== diff -u -r4000 -r4031 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/Common.cs (.../Common.cs) (revision 4000) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Assemblers/Common.cs (.../Common.cs) (revision 4031) @@ -42,14 +42,14 @@ if (str == null) { - throw new Exception("Could not locate embedded resource '" + fileName + "' in assembly '" + assemblyName + "'"); + throw new InvalidDataException("Could not locate embedded resource '" + fileName + "' in assembly '" + assemblyName + "'"); } return str; } catch (Exception e) { - throw new Exception(string.Format("{0}: {1}", assemblyName, e.Message)); + throw new InvalidDataException($"{assemblyName}: {e.Message}"); } } @@ -66,16 +66,15 @@ if (str == null) { - throw new Exception( - string.Format("Could not locate embedded resource '{0}' in assembly '{1}'", - resourceName, assembly.GetName())); + throw new InvalidDataException( + $"Could not locate embedded resource '{resourceName}' in assembly '{assembly.GetName()}'"); } return str; } catch (Exception e) { - throw new Exception(string.Format("{0}: {1}", assembly.GetName(), e.Message)); + throw new InvalidDataException($"{assembly.GetName()}: {e.Message}"); } } } Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Standard/ObjectCopier.cs =================================================================== diff -u -r4000 -r4031 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Standard/ObjectCopier.cs (.../ObjectCopier.cs) (revision 4000) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Standard/ObjectCopier.cs (.../ObjectCopier.cs) (revision 4031) @@ -149,7 +149,7 @@ { foreach (FieldInfo fieldInfo in typeToReflect.GetFields(bindingFlags)) { - if (filter != null && filter(fieldInfo) == false) + if (filter != null && !filter(fieldInfo)) { continue; } Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj =================================================================== diff -u -r4000 -r4031 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj (.../Deltares.DamEngine.Calculators.csproj) (revision 4000) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj (.../Deltares.DamEngine.Calculators.csproj) (revision 4031) @@ -1,15 +1,15 @@  - + - + <_Parameter1>Deltares.DamEngine.Calculators.Tests - + @@ -30,11 +30,11 @@ ..\..\lib\FailureMechanisms\WtiPipingMerged\Deltares.WTIPiping.Merged.dll - - - - - + + + + + Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Standard/TypeHelper.cs =================================================================== diff -u -r4000 -r4031 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Standard/TypeHelper.cs (.../TypeHelper.cs) (revision 4000) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Standard/TypeHelper.cs (.../TypeHelper.cs) (revision 4031) @@ -49,7 +49,7 @@ } Type baseType = type.BaseType; - if (!(baseType == null)) + if (baseType != null) { return baseType.GetGenericArgumentsFromFirstGenericSuperClass(); } Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/General/ParallelException.cs =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/General/ParallelException.cs (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/General/ParallelException.cs (revision 4031) @@ -0,0 +1,36 @@ +// Copyright (C) Stichting Deltares 2023. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; + +namespace Deltares.DamEngine.Calculators.General; + +/// +/// Surface Line Exception +/// +public class ParallelException : Exception +{ + /// + /// Initializes a new instance of the class. + /// + /// The message that describes the error. + public ParallelException(string message) : base(message) {} +} \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/General/Parallel.cs =================================================================== diff -u -r4023 -r4031 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/General/Parallel.cs (.../Parallel.cs) (revision 4023) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/General/Parallel.cs (.../Parallel.cs) (revision 4031) @@ -131,7 +131,7 @@ if (errorOccured) { - throw new Exception("Error occured in one of the parallel runs."); + throw new ParallelException("Error occured in one of the parallel runs."); } //DateTime end = DateTime.Now; //TimeSpan period = end - start;