Index: Ringtoets/Common/src/Ringtoets.Common.Service/CalculationServiceHelper.cs
===================================================================
diff -u -re69acb9595f7bf1d202ddd1fb51934b66768b75d -r3e9eb63e09c270127a0db49f2dea3da5ff3a3639
--- Ringtoets/Common/src/Ringtoets.Common.Service/CalculationServiceHelper.cs (.../CalculationServiceHelper.cs) (revision e69acb9595f7bf1d202ddd1fb51934b66768b75d)
+++ Ringtoets/Common/src/Ringtoets.Common.Service/CalculationServiceHelper.cs (.../CalculationServiceHelper.cs) (revision 3e9eb63e09c270127a0db49f2dea3da5ff3a3639)
@@ -95,5 +95,18 @@
log.Info(string.Format(Resources.Calculation_Subject_0_ended_Time_1_,
name, DateTimeService.CurrentTimeAsString));
}
+
+ ///
+ /// Determines whether an error has occurred during the calculation.
+ ///
+ /// The canceled state of the calculation.
+ /// Indicator if there is already an exception thrown in the calculation.
+ /// The contents of the last error file.
+ /// true when a calculation isn't canceled, has not already thrown an exception and
+ /// is set. false otherwise.
+ public static bool ErrorOccurred(bool canceled, bool exceptionThrown, string lastErrorFileContent)
+ {
+ return !canceled && !exceptionThrown && !string.IsNullOrEmpty(lastErrorFileContent);
+ }
}
}
\ No newline at end of file