Updated: October 28, 2024 |
Error information for mm-renderer
#include <mm/renderer/types.h>
typedef struct mmr_error_info { uint32_t error_code; char extra_type[20]; int64_t extra_value; char extra_text[256]; } mmr_error_info_t;
A short string identifying the API or protocol that defines the meaning of extra_value, such as errno, http, or mmf
Free-form text describing the error. This may or may not have a format formally defined by a specification. For example, when extra_type is http, this field contains an HTTP server response string.
The mmr_error_info_t structure type stores the error information generated by mm-renderer functions. Use the mmr_error_info() function to retrieve this information for a particular context and function call.
This multifield structure allows plugins to return protocol- or API-specific error information in addition to the MMR error code. The extra_type string is a tag that specifies how to interpret the extra_value and extra_text fields.
extra_type | extra_value | extra_text |
---|---|---|
(empty string) | 0 | Usually empty, possibly some descriptive text |
errno | An errno value | Usually the result of strerror(extra_value), but possibly something more descriptive |
mmf | One of the MMF error codes (not a valid errno) | Usually empty, but possibly something more descriptive |
http | An HTTP response code | An HTTP server response |
libcurl | A libcurl error code (but not CURLE_HTTP_RETURNED_ERROR) | The corresponding libcurl error message |