| 12091 | |
| 12092 | #if defined(_MSC_VER) |
| 12093 | TempFile::TempFile() { |
| 12094 | if (tmpnam_s(m_buffer)) { |
| 12095 | CATCH_RUNTIME_ERROR("Could not get a temp filename"); |
| 12096 | } |
| 12097 | if (fopen_s(&m_file, m_buffer, "w+")) { |
| 12098 | char buffer[100]; |
| 12099 | if (strerror_s(buffer, errno)) { |
| 12100 | CATCH_RUNTIME_ERROR("Could not translate errno to a string"); |
| 12101 | } |
| 12102 | CATCH_RUNTIME_ERROR("Could not open the temp file: '" << m_buffer << "' because: " << buffer); |
| 12103 | } |
| 12104 | } |
| 12105 | #else |
| 12106 | TempFile::TempFile() { |
| 12107 | m_file = std::tmpfile(); |
nothing calls this directly
no outgoing calls
no test coverage detected