Skip to main content

raise_error

Function raise_error 

Source
pub unsafe fn raise_error(
    ctxt: *mut c_void,
    _ctxt2: *mut c_void,
    _ctxt3: *mut c_void,
    _ctxt4: *mut c_void,
    _ctxt5: *mut c_void,
    domain: c_int,
    code: c_int,
    level: c_int,
    file: *const c_char,
    line: c_int,
    str1: *const c_char,
    str2: *const c_char,
    str3: *const c_char,
    int1: c_int,
    int2: c_int,
    msg: *const c_char,
)
Expand description

Raise an error — the central error reporting function.

This is called internally when an error occurs. It:

  1. Updates the thread-local last error
  2. Invokes the structured error handler if one is set
  3. Invokes the generic error handler if one is set (for warnings/errors)

§UPSTREAM-PARITY

void xmlRaiseError(xmlErrorPtr ctxt,
                   xmlErrorPtr ctxt2,
                   xmlErrorPtr ctxt3,
                   xmlErrorPtr ctxt4,
                   xmlErrorPtr ctxt5,
                   int domain,
                   int code,
                   xmlErrorLevel level,
                   const char *file,
                   int line,
                   const char *str1,
                   const char *str2,
                   const char *str3,
                   int int1,
                   int int2,
                   const char *msg,
                   ...);

§SAFETY

  • ctxt may be NULL (context of the error).
  • domain, code, level: valid error codes.
  • msg must be a valid C string or NULL.
  • file must be a valid C string or NULL.
  • str1, str2, str3: error-related strings (may be NULL).