ENH: sigStopAt: added checking for same signals

This commit is contained in:
mattijs 2011-10-17 18:27:09 +01:00
parent 286f8a828f
commit 6ef1fc7865
2 changed files with 17 additions and 0 deletions

View File

@ -83,6 +83,21 @@ Foam::sigStopAtWriteNow::sigStopAtWriteNow
{
if (signal_ > 0)
{
// Check that the signal is different from the writeNowSignal
if (sigWriteNow::signal_ == signal_)
{
FatalErrorIn
(
"Foam::sigStopAtWriteNow::sigStopAtWriteNow"
"(const bool, const Time&)"
) << "stopAtWriteNowSignal : " << signal_
<< " cannot be the same as the writeNowSignal."
<< " Please change this in the controlDict ("
<< findEtcFile("controlDict", false) << ")."
<< exit(FatalError);
}
// Store runTime
runTimePtr_ = &runTime;

View File

@ -67,6 +67,8 @@ class sigWriteNow
public:
friend class sigStopAtWriteNow;
// Constructors
//- Construct null