Populate a apu_err_t structure with the given error, allocated from the given pool.
If the result parameter points at a NULL pointer, a apu_err_t structure will be allocated, otherwise the apu_err_t structure will be reused.
- Parameters
-
result | If NULL, the apu_err_t structure is allocated and returned, otherwise the existing apu_err_t is used. |
p | The pool to use. |
reason | The reason string, may be NULL. |
rc | The underlying result code. |
fmt | The format of the string |
... | The arguments to use while printing the data |
- Returns
- The apu_err_t structure on success, NULL if out of memory.