Changeset 65597 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Feb 3, 2017 11:40:44 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/xml.cpp
r65008 r65597 32 32 #include <iprt/file.h> 33 33 #include <iprt/err.h> 34 #include <iprt/log.h> 34 35 #include <iprt/param.h> 35 36 #include <iprt/path.h> … … 1727 1728 //////////////////////////////////////////////////////////////////////////////// 1728 1729 1730 static void xmlParserBaseGenericError(void *pCtx, const char *pszMsg, ...) 1731 { 1732 NOREF(pCtx); 1733 va_list args; 1734 va_start(args, pszMsg); 1735 RTLogRelPrintfV(pszMsg, args); 1736 va_end(args); 1737 } 1738 1739 static void xmlParserBaseStructuredError(void *pCtx, xmlErrorPtr error) 1740 { 1741 NOREF(pCtx); 1742 /* we expect that there is always a trailing NL */ 1743 LogRel(("XML error at '%s' line %d: %s", error->file, error->line, error->message)); 1744 } 1745 1729 1746 XmlParserBase::XmlParserBase() 1730 1747 { … … 1732 1749 if (m_ctxt == NULL) 1733 1750 throw std::bad_alloc(); 1751 /* per-thread so it must be here */ 1752 xmlSetGenericErrorFunc(NULL, xmlParserBaseGenericError); 1753 xmlSetStructuredErrorFunc(NULL, xmlParserBaseStructuredError); 1734 1754 } 1735 1755 1736 1756 XmlParserBase::~XmlParserBase() 1737 1757 { 1758 xmlSetStructuredErrorFunc(NULL, NULL); 1759 xmlSetGenericErrorFunc(NULL, NULL); 1738 1760 xmlFreeParserCtxt (m_ctxt); 1739 1761 m_ctxt = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.