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

Function abort

src/OpenFOAM/db/error/error.C:209–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 15

messageStream.CFile · 0.70
error.CFile · 0.70
exitFunction · 0.70
resizeFunction · 0.50
fdCloseFunction · 0.50
pingFunction · 0.50
addWatchFunction · 0.50
fileMonitor.CFile · 0.50
timer.CFile · 0.50
sigHandlerFunction · 0.50
sigInt.CFile · 0.50
setFunction · 0.50

Calls 4

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

Tested by

no test coverage detected