MCPcopy Create free account
hub / github.com/cameron314/concurrentqueue / handle_win_error

Function handle_win_error

benchmarks/tbb/tbb_misc.cpp:98–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96
97#if _WIN32||_WIN64
98void handle_win_error( int error_code ) {
99 char buf[512];
100#if !__TBB_WIN8UI_SUPPORT
101 FormatMessageA( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
102 NULL, error_code, 0, buf, sizeof(buf), NULL );
103#else
104//TODO: update with right replacement for FormatMessageA
105 sprintf_s((char*)&buf, 512, "error code %d", error_code);
106#endif
107#if TBB_USE_EXCEPTIONS
108 throw runtime_error(buf);
109#else
110 PRINT_ERROR_AND_ABORT( "runtime_error", buf);
111#endif /* !TBB_USE_EXCEPTIONS */
112}
113#endif // _WIN32||_WIN64
114
115void throw_bad_last_alloc_exception_v4() {

Callers 2

joinMethod · 0.85
detachMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected