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

Function main

applications/test/error/Test-error.C:37–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35// Main program:
36
37int main(int argc, char *argv[])
38{
39 FatalError.throwExceptions();
40
41 try
42 {
43 WarningInFunction << "warning 1" << endl;
44 IOWarningInFunction(Serr) << "warning 2" << endl;
45
46 dictionary dict;
47
48 IOWarningInFunction(dict) << "warning 3" << endl;
49
50 FatalErrorInFunction << "error 1" << endl;
51 FatalErrorInFunction << "error 2" << exit(FatalError);
52 }
53 catch (Foam::error& fErr)
54 {
55 Serr<< "Caught Foam error " << fErr << nl << endl;
56 }
57
58 return 0;
59}
60
61
62// ************************************************************************* //

Callers

nothing calls this directly

Calls 2

throwExceptionsMethod · 0.80
exitFunction · 0.50

Tested by

no test coverage detected