Commit 862d963a authored by Henry Weller's avatar Henry Weller
Browse files

functionObjectList: Print the messages from errors caught during functionObject construction

Exit on FatalIOError
parent 32dbb01e
...@@ -355,15 +355,26 @@ bool Foam::functionObjectList::read() ...@@ -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;
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment