rtcGetDeviceError.3embree3 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. .TH "rtcGetDeviceError" "3" "" "" "Embree Ray Tracing Kernels 3"
  2. .SS NAME
  3. .IP
  4. .nf
  5. \f[C]
  6. rtcGetDeviceError\ \-\ returns\ the\ error\ code\ of\ the\ device
  7. \f[]
  8. .fi
  9. .SS SYNOPSIS
  10. .IP
  11. .nf
  12. \f[C]
  13. #include\ <embree3/rtcore.h>
  14. RTCError\ rtcGetDeviceError(RTCDevice\ device);
  15. \f[]
  16. .fi
  17. .SS DESCRIPTION
  18. .PP
  19. Each thread has its own error code per device.
  20. If an error occurs when calling an API function, this error code is set
  21. to the occurred error if it stores no previous error.
  22. The \f[C]rtcGetDeviceError\f[] function reads and returns the currently
  23. stored error and clears the error code.
  24. This assures that the returned error code is always the first error
  25. occurred since the last invocation of \f[C]rtcGetDeviceError\f[].
  26. .PP
  27. Possible error codes returned by \f[C]rtcGetDeviceError\f[] are:
  28. .IP \[bu] 2
  29. \f[C]RTC_ERROR_NONE\f[]: No error occurred.
  30. .IP \[bu] 2
  31. \f[C]RTC_ERROR_UNKNOWN\f[]: An unknown error has occurred.
  32. .IP \[bu] 2
  33. \f[C]RTC_ERROR_INVALID_ARGUMENT\f[]: An invalid argument was specified.
  34. .IP \[bu] 2
  35. \f[C]RTC_ERROR_INVALID_OPERATION\f[]: The operation is not allowed for
  36. the specified object.
  37. .IP \[bu] 2
  38. \f[C]RTC_ERROR_OUT_OF_MEMORY\f[]: There is not enough memory left to
  39. complete the operation.
  40. .IP \[bu] 2
  41. \f[C]RTC_ERROR_UNSUPPORTED_CPU\f[]: The CPU is not supported as it does
  42. not support the lowest ISA Embree is compiled for.
  43. .IP \[bu] 2
  44. \f[C]RTC_ERROR_CANCELLED\f[]: The operation got canceled by a memory
  45. monitor callback or progress monitor callback function.
  46. .PP
  47. When the device construction fails, \f[C]rtcNewDevice\f[] returns
  48. \f[C]NULL\f[] as device.
  49. To detect the error code of a such a failed device construction, pass
  50. \f[C]NULL\f[] as device to the \f[C]rtcGetDeviceError\f[] function.
  51. For all other invocations of \f[C]rtcGetDeviceError\f[], a proper device
  52. pointer must be specified.
  53. .SS EXIT STATUS
  54. .PP
  55. Returns the error code for the device.
  56. .SS SEE ALSO
  57. .PP
  58. [rtcSetDeviceErrorFunction]