functionObjectList: Print the messages from errors caught during functionObject construction

Exit on FatalIOError
This commit is contained in:
Henry Weller
2016-05-11 10:19:07 +01:00
parent 32dbb01e96
commit 862d963a95

View File

@ -355,15 +355,26 @@ bool Foam::functionObjectList::read()
{ {
foPtr = functionObject::New(key, time_, dict); foPtr = functionObject::New(key, time_, dict);
} }
catch (...) catch (Foam::IOerror& ioErr)
{} {
Info<< ioErr << nl << endl;
::exit(1);
}
catch (Foam::error& err)
{
WarningInFunction
<< "Caught FatalError " << err << nl << endl;
}
FatalError.dontThrowExceptions(); FatalError.dontThrowExceptions();
FatalIOError.dontThrowExceptions(); FatalIOError.dontThrowExceptions();
if (foPtr.valid()) if (foPtr.valid())
{ {
objPtr = foPtr.ptr(); objPtr = foPtr.ptr();
ok = objPtr->start() && ok; }
else
{
ok = false;
} }
} }