MCPcopy Create free account
hub / github.com/RenderKit/embree / errorHandler

Function errorHandler

tutorials/verify/verify.cpp:31–46  ·  view source on GitHub ↗

error reporting function */

Source from the content-addressed store, hash-verified

29
30 /* error reporting function */
31 void errorHandler(void* userPtr, const RTCError code, const char* str = nullptr)
32 {
33 if (code == RTC_ERROR_NONE)
34 return;
35
36 std::string descr = str ? ": " + std::string(str) : "";
37 switch (code) {
38 case RTC_ERROR_UNKNOWN : throw std::runtime_error("RTC_ERROR_UNKNOWN"+descr);
39 case RTC_ERROR_INVALID_ARGUMENT : throw std::runtime_error("RTC_ERROR_INVALID_ARGUMENT"+descr); break;
40 case RTC_ERROR_INVALID_OPERATION: throw std::runtime_error("RTC_ERROR_INVALID_OPERATION"+descr); break;
41 case RTC_ERROR_OUT_OF_MEMORY : throw std::runtime_error("RTC_ERROR_OUT_OF_MEMORY"+descr); break;
42 case RTC_ERROR_UNSUPPORTED_CPU : throw std::runtime_error("RTC_ERROR_UNSUPPORTED_CPU"+descr); break;
43 case RTC_ERROR_CANCELLED : throw std::runtime_error("RTC_ERROR_CANCELLED"+descr); break;
44 default : throw std::runtime_error("invalid error code"+descr); break;
45 }
46 }
47
48 bool hasISA(const int isa)
49 {

Callers 15

runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
run_buildMethod · 0.85
runMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected