13
0

print XML errors to stderr not just the error stream

This commit is contained in:
Paul Davis 2022-11-19 21:30:22 -07:00
parent fd78ea90b8
commit d757fd5506

View File

@ -260,14 +260,18 @@ libxml_structured_error_func (void* /* parsing_context*/,
if (!msg.empty()) {
if (err->file && err->line) {
error << X_("XML error: ") << msg << " in " << err->file << " at line " << err->line;
std::cerr << X_("XML error: ") << msg << " in " << err->file << " at line " << err->line;
if (err->int2) {
error << ':' << err->int2;
std::cerr << ':' << err->int2;
}
error << endmsg;
std::cerr << std::endl;
} else {
error << X_("XML error: ") << msg << endmsg;
std::cerr << X_("XML error: ") << msg << std::endl;
}
}
}