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

Function abort

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

Source from the content-addressed store, hash-verified

210
211
212void Foam::IOerror::abort()
213{
214 if (!throwExceptions_ && JobInfo::constructed)
215 {
216 jobInfo.add("FatalIOError", operator dictionary());
217 jobInfo.abort();
218 }
219
220 if (abort_)
221 {
222 Perr<< endl << *this << endl
223 << "\nFOAM aborting (FOAM_ABORT set)\n" << endl;
224 printStack(Perr);
225 ::abort();
226 }
227
228 if (Pstream::parRun())
229 {
230 Perr<< endl << *this << endl
231 << "\nFOAM parallel run aborting\n" << endl;
232 printStack(Perr);
233 Pstream::abort();
234 }
235 else
236 {
237 if (throwExceptions_)
238 {
239 // Make a copy of the error to throw
240 IOerror errorException(*this);
241
242 // Rewind the message buffer for the next error message
243 messageStreamPtr_->rewind();
244
245 throw errorException;
246 }
247 else
248 {
249 Perr<< endl << *this << endl
250 << "\nFOAM aborting\n" << endl;
251 printStack(Perr);
252 ::abort();
253 }
254 }
255}
256
257
258Foam::Ostream& Foam::operator<<(Ostream& os, const IOerror& ioErr)

Callers 1

exitFunction · 0.70

Calls 4

dictionaryClass · 0.70
printStackFunction · 0.50
addMethod · 0.45
rewindMethod · 0.45

Tested by

no test coverage detected