mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
functionObjectList: Print the messages from errors caught during functionObject construction
Exit on FatalIOError
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user