1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-24 13:33:01 +03:00

misc: Improve error handling

Remove calls to generic error handler or use stderr for

- legacy deprecation warnings
- nanohttp, nanoftp in standalone mode
- memory debug messages

Use xmlRaiseMemoryError.

Remove TODO macro.

Don't raise errors in xmlmodule.c.
This commit is contained in:
Nick Wellnhofer
2023-12-18 21:32:49 +01:00
parent bc1e030664
commit ecb4c9fb28
8 changed files with 60 additions and 130 deletions

View File

@@ -498,9 +498,8 @@ xmlGlobalInitMutexLock(void) {
if (global_init_lock == NULL) {
cs = malloc(sizeof(CRITICAL_SECTION));
if (cs == NULL) {
xmlGenericError(xmlGenericErrorContext,
"xmlGlobalInitMutexLock: out of memory\n");
return;
fprintf(stderr, "libxml2: xmlInitParser: out of memory\n");
abort();
}
InitializeCriticalSection(cs);