dmi_error_get_first
Description
The dmi_error_get_first function removes the oldest error descriptor from
the error queue of context and returns a pointer to it. It can be called
repeatedly until there are no more entries.
The returned pointer remains valid until the error queue is next modified by
dmi_error_raise, dmi_error_raise_ex, dmi_error_get_first,
dmi_error_get_last, or dmi_error_clear. The descriptor is no longer
part of the queue, so its slot, including message, is reused by the next
error raised for context, and any library function called with context
may raise one. Copy whatever is needed before calling into the library again.
Return value
Returns a pointer to the oldest dmi_error_t removed from the queue, or
nullptr if context is nullptr or the error queue is empty.