| 115 | |
| 116 | |
| 117 | void 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 | |
| 156 | Foam::IOerror::operator Foam::dictionary() const |
nothing calls this directly
no test coverage detected