| 306 | } |
| 307 | |
| 308 | void Device::process_error(Device* device, RTCError error, const char* str) |
| 309 | { |
| 310 | /* store global error code when device construction failed */ |
| 311 | if (!device) |
| 312 | return setThreadErrorCode(error, str ? std::string(str) : std::string()); |
| 313 | |
| 314 | /* print error when in verbose mode */ |
| 315 | if (device->verbosity(1)) |
| 316 | { |
| 317 | std::cerr << "Embree: " << getErrorString(error); |
| 318 | if (str) std::cerr << ", (" << str << ")"; |
| 319 | std::cerr << std::endl; |
| 320 | } |
| 321 | |
| 322 | /* call user specified error callback */ |
| 323 | if (device->error_function) |
| 324 | device->error_function(device->error_function_userptr,error,str); |
| 325 | |
| 326 | /* record error code */ |
| 327 | device->setDeviceErrorCode(error, str ? std::string(str) : std::string()); |
| 328 | } |
| 329 | |
| 330 | void Device::memoryMonitor(ssize_t bytes, bool post) |
| 331 | { |
nothing calls this directly
no test coverage detected