MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlRaiseMemoryError

Function xmlRaiseMemoryError

ThirdParty/libxml2/vtklibxml2/error.c:634–659  ·  view source on GitHub ↗

* xmlRaiseMemoryError: * @schannel: the structured callback channel * @channel: the old callback channel * @data: the callback data * @domain: the domain for the error * @error: optional error struct to be filled * * Update the global and optional error structure, then forward the * error to an error handler. * * This function doesn't make memory allocations which are likely * to fail a

Source from the content-addressed store, hash-verified

632 * to fail after an OOM error.
633 */
634void
635xmlRaiseMemoryError(xmlStructuredErrorFunc schannel, xmlGenericErrorFunc channel,
636 void *data, int domain, xmlError *error)
637{
638 xmlError *lastError = &xmlLastError;
639
640 xmlResetLastError();
641 lastError->domain = domain;
642 lastError->code = XML_ERR_NO_MEMORY;
643 lastError->level = XML_ERR_FATAL;
644
645 if (error != NULL) {
646 xmlResetError(error);
647 error->domain = domain;
648 error->code = XML_ERR_NO_MEMORY;
649 error->level = XML_ERR_FATAL;
650 }
651
652 if (schannel != NULL) {
653 schannel(data, lastError);
654 } else if (xmlStructuredError != NULL) {
655 xmlStructuredError(xmlStructuredErrorContext, lastError);
656 } else if (channel != NULL) {
657 channel(data, "libxml2: out of memory\n");
658 }
659}
660
661/**
662 * xmlVRaiseError:

Callers 15

xmlCatalogErrMemoryFunction · 0.85
xmlC14NErrMemoryFunction · 0.85
xmlVErrMemoryFunction · 0.85
xmlXPathErrMemoryFunction · 0.85
xmlTextReaderErrMemoryFunction · 0.85
xmlSchematronPErrMemoryFunction · 0.85
xmlSchematronVErrMemoryFunction · 0.85
xmlFTPErrMemoryFunction · 0.85
xmlCtxtErrMemoryFunction · 0.85
xmlSchemaPErrMemoryFunction · 0.85
xmlSchemaVErrMemoryFunction · 0.85
xmlXPtrErrMemoryFunction · 0.85

Calls 2

xmlResetLastErrorFunction · 0.85
xmlResetErrorFunction · 0.85

Tested by

no test coverage detected