diff options
Diffstat (limited to 'c/data.cpp')
-rw-r--r-- | c/data.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -20,18 +20,18 @@ UniqueOk<htmlParserCtxtPtr, xmlFreeParserCtxt> RemoteParserCtxt(const wchar_t* w static Unique<HINTERNET, InternetCloseHandle> hi = InternetOpenW(L"Episode Browser", INTERNET_OPEN_TYPE_DIRECT, nullptr, nullptr, 0); if (hi.Bad(0)) - throw Err(WINDOWS, L"Internet handle could not be opened: %s"); + throw Err(WINDOWS, L"Internet handle could not be opened: %s."); Unique<HINTERNET, InternetCloseHandle> hiUrl = InternetOpenUrlW( hi.v, wszUrl, nullptr, 0, INTERNET_FLAG_NO_UI, 0); if (hiUrl.Bad(0)) - throw Err(WININET, L"Could not open "s + wszUrl + L": %s"); + throw Err(WININET, L"Could not open "s + wszUrl + L": %s."); char bufX[1024]; Unique<htmlParserCtxtPtr, xmlFreeParserCtxt> ctx = htmlCreatePushParserCtxt( nullptr, nullptr, bufX, sizeof(bufX), szUrl, XML_CHAR_ENCODING_UTF8); if (ctx.Bad(0)) - throw Err(LIBXML2, L"HTML parser context could not be created: %s"); + throw Err(LIBXML2, L"HTML parser context could not be created: %s."); htmlCtxtUseOptions(ctx.v, HTML_PARSE_RECOVER|HTML_PARSE_NOERROR|HTML_PARSE_NOWARNING); @@ -40,9 +40,9 @@ UniqueOk<htmlParserCtxtPtr, xmlFreeParserCtxt> RemoteParserCtxt(const wchar_t* w char bufI[1024]; while (r = InternetReadFile(hiUrl.v, bufI, sizeof(bufI), &cbRead), cbRead) { if (!r) - throw Err(WININET, L"HTML could not be retrieved: %s"); + throw Err(WININET, L"HTML could not be retrieved: %s."); if (!htmlParseChunk(ctx.v, bufI, cbRead, 0)) - throw Err(LIBXML2, L"HTML could not be parsed: %s"); + throw Err(LIBXML2, L"HTML could not be parsed: %s."); } htmlParseChunk(ctx.v, bufI, 0, 1); /* Stop parsing. */ @@ -55,7 +55,7 @@ template <size_t N> bool WcharsFromXmlchars(wchar_t (&dst)[N], Unique<xmlChar*, XmlFree> utf8) { if (utf8.Bad(0)) - throw Err(LIBXML2, L"Node content could not be retrieved: %s"); + throw Err(LIBXML2, L"Node content could not be retrieved: %s."); /* Truncate if source is larger than destination. */ int lenUtf8 = xmlStrlen(utf8.v); @@ -153,7 +153,7 @@ void WaitFor(Window& window, void (*f)(unsigned char*)) std::thread(procThread, f).detach(); s_window->Status(L".", 1); if (!(iTimer = SetTimer(nullptr, iTimer, 500, procTimer))) - throw Err(WINDOWS, L"Timer could not be started: %s"); + throw Err(WINDOWS, L"Timer could not be started: %s."); } void FetchData(unsigned char* sig) @@ -173,13 +173,13 @@ void FetchData(unsigned char* sig) Unique<xmlXPathContextPtr, xmlXPathFreeContext> xpathCtx = xmlXPathNewContext(ctx.v->myDoc); if (xpathCtx.Bad(0)) - throw Err(LIBXML2, L"XPath context could not be created: %s"); + throw Err(LIBXML2, L"XPath context could not be created: %s."); Unique<xmlXPathObjectPtr, xmlXPathFreeObject> xpathObj = xmlXPathEvalExpression( reinterpret_cast<const xmlChar*>("//tr[./td[1] != '' and ./td[3][@style='background:#f2fde9;']]"), xpathCtx.v); if (xpathObj.Bad(0)) - throw Err(LIBXML2, L"XPath object could not be created: %s"); + throw Err(LIBXML2, L"XPath object could not be created: %s."); xmlNodeSetPtr nodes = xpathObj.v->nodesetval; @@ -270,13 +270,13 @@ void FetchScreenwriters(unsigned char* sig) UniqueOk<htmlParserCtxtPtr, xmlFreeParserCtxt> ctx = RemoteParserCtxt(url, nullptr); xpathCtx = xmlXPathNewContext(ctx.v->myDoc); if (xpathCtx.Bad(0)) - throw Err(LIBXML2, L"XPath context could not be created: %s"); + throw Err(LIBXML2, L"XPath context could not be created: %s."); xpathObj = xmlXPathEvalExpression(reinterpret_cast<const xmlChar*>( "//th[contains(text(), 'Screenplay:')]/following-sibling::td"), xpathCtx.v); if (xpathObj.Bad(0)) - throw Err(LIBXML2, L"XPath object could not be created: %s"); + throw Err(LIBXML2, L"XPath object could not be created: %s."); xmlNodeSetPtr nodes = xpathObj.v->nodesetval; if (nodes && nodes->nodeNr) |