MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / errorImpl

Method errorImpl

deps/physx/physx/source/foundation/src/PsFoundation.cpp:103–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void Foundation::errorImpl(PxErrorCode::Enum e, const char* file, int line, const char* messageFmt, va_list va)
104{
105 PX_ASSERT(messageFmt);
106 if(e & mErrorMask)
107 {
108 // this function is reentrant but user's error callback may not be, so...
109 Mutex::ScopedLock lock(mErrorMutex);
110
111 // using a static fixed size buffer here because:
112 // 1. vsnprintf return values differ between platforms
113 // 2. va_start is only usable in functions with ellipses
114 // 3. ellipses (...) cannot be passed to called function
115 // which would be necessary to dynamically grow the buffer here
116
117 static const size_t bufSize = 1024;
118 char stringBuffer[bufSize];
119 shdfnd::vsnprintf(stringBuffer, bufSize, messageFmt, va);
120
121 mBroadcastingError.reportError(e, stringBuffer, file, line);
122 }
123}
124
125Foundation* Foundation::createInstance(PxU32 version, PxErrorCallback& errc, PxAllocatorCallback& alloc)
126{

Callers 1

displayMessageMethod · 0.80

Calls 2

vsnprintfFunction · 0.85
reportErrorMethod · 0.45

Tested by

no test coverage detected