MCPcopy Create free account
hub / github.com/RenderKit/oidn / getError

Method getError

core/device.cpp:140–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138 }
139
140 Error Device::getError(Device* device, const char** outMessage)
141 {
142 // Return and clear the stored error code, but keep the error message so pointers to it will
143 // remain valid until the next getError call
144 if (device)
145 {
146 ErrorState& curError = device->error.get();
147 const Error code = curError.code;
148 if (outMessage)
149 *outMessage = (code == Error::None) ? nullptr : curError.message.c_str();
150 curError.code = Error::None;
151 return code;
152 }
153 else
154 {
155 const Error code = globalError.code;
156 if (outMessage)
157 *outMessage = (code == Error::None) ? nullptr : globalError.message.c_str();
158 globalError.code = Error::None;
159 return code;
160 }
161 }
162
163 void Device::setAsyncError(Error code, const std::string& message)
164 {

Callers 9

mainFunction · 0.45
makeAndCommitDeviceFunction · 0.45
oidnTest.cppFile · 0.45
imageSizeTestFunction · 0.45
sanitizationTestFunction · 0.45
progressTestFunction · 0.45
mainFunction · 0.45

Calls 2

c_strMethod · 0.80
getMethod · 0.45

Tested by 6

makeAndCommitDeviceFunction · 0.36
imageSizeTestFunction · 0.36
sanitizationTestFunction · 0.36
progressTestFunction · 0.36