error reporting function */
| 877 | |
| 878 | /* error reporting function */ |
| 879 | void error_handler(void* userPtr, const RTCError code, const char* str = nullptr) |
| 880 | { |
| 881 | if (code == RTC_ERROR_NONE) |
| 882 | return; |
| 883 | |
| 884 | std::string errorStr; |
| 885 | errorStr += "Embree: "; |
| 886 | errorStr += string_of(code); |
| 887 | if (str) errorStr += " (" + std::string(str) + ")"; |
| 888 | throw std::runtime_error(errorStr); |
| 889 | } |
| 890 | } |
| 891 |
nothing calls this directly
no test coverage detected