| 8100 | |
| 8101 | #if defined(_MSC_VER) |
| 8102 | TempFile::TempFile() { |
| 8103 | if (tmpnam_s(m_buffer)) { |
| 8104 | throw std::runtime_error("Could not get a temp filename"); |
| 8105 | } |
| 8106 | if (fopen_s(&m_file, m_buffer, "w")) { |
| 8107 | char buffer[100]; |
| 8108 | if (strerror_s(buffer, errno)) { |
| 8109 | throw std::runtime_error("Could not translate errno to string"); |
| 8110 | } |
| 8111 | throw std::runtime_error("Could not open the temp file: " + std::string(m_buffer) + buffer); |
| 8112 | } |
| 8113 | } |
| 8114 | #else |
| 8115 | TempFile::TempFile() { |
| 8116 | m_file = std::tmpfile(); |
nothing calls this directly
no outgoing calls
no test coverage detected