.\" Automatically generated by Pandoc 2.9.2.1 .\" .TH "rtcGetDeviceError" "3" "" "" "Embree Ray Tracing Kernels 4" .hy .SS NAME .IP .nf \f[C] rtcGetDeviceError - returns the error code of the device \f[R] .fi .SS SYNOPSIS .IP .nf \f[C] #include RTCError rtcGetDeviceError(RTCDevice device); \f[R] .fi .SS DESCRIPTION .PP Each thread has its own error code per device. If an error occurs when calling an API function, this error code is set to the occurred error if it stores no previous error. The \f[C]rtcGetDeviceError\f[R] function reads and returns the currently stored error and clears the error code. This assures that the returned error code is always the first error occurred since the last invocation of \f[C]rtcGetDeviceError\f[R]. .PP Possible error codes returned by \f[C]rtcGetDeviceError\f[R] are: .IP \[bu] 2 \f[C]RTC_ERROR_NONE\f[R]: No error occurred. .IP \[bu] 2 \f[C]RTC_ERROR_UNKNOWN\f[R]: An unknown error has occurred. .IP \[bu] 2 \f[C]RTC_ERROR_INVALID_ARGUMENT\f[R]: An invalid argument was specified. .IP \[bu] 2 \f[C]RTC_ERROR_INVALID_OPERATION\f[R]: The operation is not allowed for the specified object. .IP \[bu] 2 \f[C]RTC_ERROR_OUT_OF_MEMORY\f[R]: There is not enough memory left to complete the operation. .IP \[bu] 2 \f[C]RTC_ERROR_UNSUPPORTED_CPU\f[R]: The CPU is not supported as it does not support the lowest ISA Embree is compiled for. .IP \[bu] 2 \f[C]RTC_ERROR_CANCELLED\f[R]: The operation got canceled by a memory monitor callback or progress monitor callback function. .PP When the device construction fails, \f[C]rtcNewDevice\f[R] returns \f[C]NULL\f[R] as device. To detect the error code of a such a failed device construction, pass \f[C]NULL\f[R] as device to the \f[C]rtcGetDeviceError\f[R] function. For all other invocations of \f[C]rtcGetDeviceError\f[R], a proper device pointer must be specified. .SS EXIT STATUS .PP Returns the error code for the device. .SS SEE ALSO .PP [rtcSetDeviceErrorFunction]