MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / mod_GetLastError

Function mod_GetLastError

module/module.cpp:476–486  ·  view source on GitHub ↗

Returns an error code to what the last error was. When this function is called the last error is cleared, so by calling this function it not only returns the last error, but it removes it, so if you were to call this function again, it would return no error

Source from the content-addressed store, hash-verified

474// calling this function it not only returns the last error, but it removes it, so if you were to call this function
475// again, it would return no error
476int mod_GetLastError(void) {
477 // Clear out the errors
478#if defined(WIN32)
479 SetLastError(0);
480#elif defined(POSIX)
481 dlerror();
482#endif
483 int ret = ModLastError;
484 ModLastError = MODERR_NOERROR;
485 return ret;
486}
487
488#if defined(POSIX)
489#include <assert.h>

Callers 5

LoadMultiDLLFunction · 0.85
CloseGameModuleFunction · 0.85
InitGameModuleFunction · 0.85
LoadGameDLLFunction · 0.85
GetDLLGameInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected