MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / SafeFatalIOError

Function SafeFatalIOError

src/OpenFOAM/db/error/IOerror.C:117–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115
116
117void Foam::IOerror::SafeFatalIOError
118(
119 const char* functionName,
120 const char* sourceFileName,
121 const int sourceFileLineNumber,
122 const IOstream& ioStream,
123 const string& msg
124)
125{
126 if (JobInfo::constructed)
127 {
128 FatalIOError
129 (
130 functionName,
131 sourceFileName,
132 sourceFileLineNumber,
133 ioStream
134 ) << msg << Foam::exit(FatalIOError);
135 }
136 else
137 {
138 std::cerr
139 << std::endl
140 << "--> FOAM FATAL IO ERROR:" << std::endl
141 << msg
142 << std::endl
143 << "file: " << ioStream.name()
144 << " at line " << ioStream.lineNumber() << '.'
145 << std::endl << std::endl
146 << " From function " << functionName
147 << std::endl
148 << " in file " << sourceFileName
149 << " at line " << sourceFileLineNumber << '.'
150 << std::endl;
151 ::exit(1);
152 }
153}
154
155
156Foam::IOerror::operator Foam::dictionary() const

Callers

nothing calls this directly

Calls 3

exitFunction · 0.70
nameMethod · 0.45
lineNumberMethod · 0.45

Tested by

no test coverage detected