MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / TempFile

Method TempFile

extlibs/catch/include/catch/catch.hpp:11605–11616  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11603
11604#if defined(_MSC_VER)
11605 TempFile::TempFile() {
11606 if (tmpnam_s(m_buffer)) {
11607 CATCH_RUNTIME_ERROR("Could not get a temp filename");
11608 }
11609 if (fopen_s(&m_file, m_buffer, "w")) {
11610 char buffer[100];
11611 if (strerror_s(buffer, errno)) {
11612 CATCH_RUNTIME_ERROR("Could not translate errno to a string");
11613 }
11614 CATCH_RUNTIME_ERROR("Could not open the temp file: '" << m_buffer << "' because: " << buffer);
11615 }
11616 }
11617#else
11618 TempFile::TempFile() {
11619 m_file = std::tmpfile();

Callers

nothing calls this directly

Calls 2

fopen_sFunction · 0.85
strerror_sFunction · 0.85

Tested by

no test coverage detected