MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / default_error_condition

Method default_error_condition

system/lib/libcxx/src/system_error.cpp:303–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301}
302
303error_condition __system_error_category::default_error_condition(int ev) const noexcept {
304#ifdef _LIBCPP_WIN32API
305 // Remap windows error codes to generic error codes if possible.
306 if (ev == 0)
307 return error_condition(0, generic_category());
308 if (auto maybe_errc = __win_err_to_errc(ev))
309 return error_condition(static_cast<int>(*maybe_errc), generic_category());
310 return error_condition(ev, system_category());
311#else
312# ifdef _LIBCPP_ELAST
313 if (ev > _LIBCPP_ELAST)
314 return error_condition(ev, system_category());
315# endif // _LIBCPP_ELAST
316 return error_condition(ev, generic_category());
317#endif
318}
319
320const error_category& system_category() noexcept {
321 union AvoidDestroyingSystemCategory {

Callers 1

default_error_conditionFunction · 0.45

Calls 2

error_conditionFunction · 0.85
__win_err_to_errcFunction · 0.85

Tested by

no test coverage detected