* xmlRegexpErrCompile: * @extra: extra information * * Handle a compilation failure */
| 373 | * Handle a compilation failure |
| 374 | */ |
| 375 | static void |
| 376 | xmlRegexpErrCompile(xmlRegParserCtxtPtr ctxt, const char *extra) |
| 377 | { |
| 378 | const char *regexp = NULL; |
| 379 | int idx = 0; |
| 380 | int res; |
| 381 | |
| 382 | if (ctxt != NULL) { |
| 383 | regexp = (const char *) ctxt->string; |
| 384 | idx = ctxt->cur - ctxt->string; |
| 385 | ctxt->error = XML_REGEXP_COMPILE_ERROR; |
| 386 | } |
| 387 | |
| 388 | res = __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_REGEXP, |
| 389 | XML_REGEXP_COMPILE_ERROR, XML_ERR_FATAL, |
| 390 | NULL, 0, extra, regexp, NULL, idx, 0, |
| 391 | "failed to compile: %s\n", extra); |
| 392 | if (res < 0) |
| 393 | xmlRegexpErrMemory(ctxt); |
| 394 | } |
| 395 | |
| 396 | /************************************************************************ |
| 397 | * * |
nothing calls this directly
no test coverage detected