functionObjectList: Print the messages from errors caught during functionObject construction
Exit on FatalIOError
This commit is contained in:
parent
de7ac625e4
commit
4b54fb9f9d
1 changed files with 14 additions and 3 deletions
|
|
@ -355,15 +355,26 @@ bool Foam::functionObjectList::read()
|
|||
{
|
||||
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();
|
||||
FatalIOError.dontThrowExceptions();
|
||||
|
||||
if (foPtr.valid())
|
||||
{
|
||||
objPtr = foPtr.ptr();
|
||||
ok = objPtr->start() && ok;
|
||||
}
|
||||
else
|
||||
{
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue