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

Function htmlSaveErr

ThirdParty/libxml2/vtklibxml2/HTMLtree.c:346–375  ·  view source on GitHub ↗

* htmlSaveErr: * @code: the error number * @node: the location of the error. * @extra: extra information * * Handle an out of memory condition */

Source from the content-addressed store, hash-verified

344 * Handle an out of memory condition
345 */
346static void
347htmlSaveErr(int code, xmlNodePtr node, const char *extra)
348{
349 const char *msg = NULL;
350 int res;
351
352 switch(code) {
353 case XML_SAVE_NOT_UTF8:
354 msg = "string is not in UTF-8\n";
355 break;
356 case XML_SAVE_CHAR_INVALID:
357 msg = "invalid character value\n";
358 break;
359 case XML_SAVE_UNKNOWN_ENCODING:
360 msg = "unknown encoding %s\n";
361 break;
362 case XML_SAVE_NO_DOCTYPE:
363 msg = "HTML has no DOCTYPE\n";
364 break;
365 default:
366 msg = "unexpected error number\n";
367 }
368
369 res = __xmlRaiseError(NULL, NULL, NULL, NULL, node,
370 XML_FROM_OUTPUT, code, XML_ERR_ERROR, NULL, 0,
371 extra, NULL, NULL, 0, 0,
372 msg, extra);
373 if (res < 0)
374 xmlRaiseMemoryError(NULL, NULL, NULL, XML_FROM_OUTPUT, NULL);
375}
376
377/************************************************************************
378 * *

Callers 2

htmlFindOutputEncoderFunction · 0.85
htmlDtdDumpOutputFunction · 0.85

Calls 2

__xmlRaiseErrorFunction · 0.85
xmlRaiseMemoryErrorFunction · 0.85

Tested by

no test coverage detected