diff --git a/README.md b/README.md index 3d5db33c..ab722519 100644 --- a/README.md +++ b/README.md @@ -414,6 +414,12 @@ argument) that further describes the error. The error code is always set even if an error callback function is registered. It is recommended to always set a error callback function, to detect all errors. +When the device construction fails, `oidnNewDevice` returns `NULL` as +device. To detect the error code of a such failed device construction, +pass `NULL` as device to the `oidnGetDeviceError` function. For all +other invocations of `oidnGetDeviceError`, a proper device handle must +be specified. + The following errors are currently used by Open Image Denoise: diff --git a/doc/api.md b/doc/api.md index a719d9e7..fb8b41c6 100644 --- a/doc/api.md +++ b/doc/api.md @@ -194,6 +194,11 @@ the error code (`code` argument) of the occurred error, as well as a string set even if an error callback function is registered. It is recommended to always set a error callback function, to detect all errors. +When the device construction fails, `oidnNewDevice` returns `NULL` as device. +To detect the error code of a such failed device construction, pass `NULL` as +device to the `oidnGetDeviceError` function. For all other invocations of +`oidnGetDeviceError`, a proper device handle must be specified. + The following errors are currently used by Open Image Denoise: ------------------------------- ----------------------------------------------- diff --git a/readme.pdf b/readme.pdf new file mode 100644 index 00000000..dc7f51e2 Binary files /dev/null and b/readme.pdf differ