1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-08-02 04:21:55 +03:00

error: Refactor error reporting

Introduce xmlStrVASPrintf, trying to handle buggy snprintf
implementations.

Introduce xmlSetError to set errors atomically.

Introduce xmlUpdateError to set an error, fixing up node, file and line.

Introduce helper function xmlRaiseMemoryError.

Make legacy error handlers call xmlReportError, avoiding checks in
xmlVRaiseError.

Remove fragile support for getting file and line info from XInclude
nodes.
This commit is contained in:
Nick Wellnhofer
2023-12-18 19:12:08 +01:00
parent ed3ad3e173
commit c5a8aef2f6
6 changed files with 417 additions and 425 deletions

View File

@ -99,7 +99,7 @@ libxml2.registerInputCallback(my_input_cb)
run_test(desc="Loading entity with custom callback",
docpath=startURL, catalog=None,
exp_status="loaded", exp_err=[
(-1, "Attempt to load network entity http://example.com/dtds/sample.dtd"),
( 3, "Attempt to load network entity http://example.com/dtds/sample.dtd"),
( 4, "Entity 'sample.entity' not defined\n")
])