Skip to main content

format_error_message

Function format_error_message 

Source
pub fn format_error_message(
    _domain: c_int,
    _code: c_int,
    msg: *const c_char,
    str1: *const c_char,
    str2: *const c_char,
    str3: *const c_char,
) -> *mut c_char
Expand description

Format an error message.

This function creates a formatted error message from the component parts. In Phase 1, this is a basic implementation. In Phase 2+, variadic printf-style formatting will be added.

Returns a C string pointer (allocated with xmlMalloc) that the caller must free with xmlFree, or NULL on allocation failure.

ยงUPSTREAM-PARITY

Upstream libxml2 uses vsnprintf internally for message formatting. We use a simple formatting approach that produces compatible output for the common error patterns.