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

Function exit

src/OpenFOAM/db/error/error.C:168–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166
167
168void Foam::error::exit(const int errNo)
169{
170 if (!throwExceptions_ && JobInfo::constructed)
171 {
172 jobInfo.add("FatalError", operator dictionary());
173 jobInfo.exit();
174 }
175
176 if (abort_)
177 {
178 abort();
179 }
180
181 if (Pstream::parRun())
182 {
183 Perr<< endl << *this << endl
184 << "\nFOAM parallel run exiting\n" << endl;
185 Pstream::exit(errNo);
186 }
187 else
188 {
189 if (throwExceptions_)
190 {
191 // Make a copy of the error to throw
192 error errorException(*this);
193
194 // Rewind the message buffer for the next error message
195 messageStreamPtr_->rewind();
196
197 throw errorException;
198 }
199 else
200 {
201 Perr<< endl << *this << endl
202 << "\nFOAM exiting\n" << endl;
203 ::exit(1);
204 }
205 }
206}
207
208
209void Foam::error::abort()

Callers 15

error.CFile · 0.70
solveFunction · 0.50
solveFunction · 0.50
ODESolverNew.CFile · 0.50
solveFunction · 0.50
POSIX.CFile · 0.50
mkDirFunction · 0.50
createThreadFunction · 0.50
joinThreadFunction · 0.50
lockMutexFunction · 0.50
unlockMutexFunction · 0.50
fileMonitor.CFile · 0.50

Calls 4

dictionaryClass · 0.70
abortFunction · 0.70
addMethod · 0.45
rewindMethod · 0.45

Tested by

no test coverage detected