Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/Oracle/WebAssemblyOracle.cpp @ 1572:1b3039384972
cppcheck
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 21 Sep 2020 18:13:52 +0200 |
parents | a48ae10857b1 |
children |
comparison
equal
deleted
inserted
replaced
1571:85e117739eca | 1572:1b3039384972 |
---|---|
340 | 340 |
341 static void FailureCallback(emscripten_fetch_t *fetch) | 341 static void FailureCallback(emscripten_fetch_t *fetch) |
342 { | 342 { |
343 std::unique_ptr<FetchContext> context(reinterpret_cast<FetchContext*>(fetch->userData)); | 343 std::unique_ptr<FetchContext> context(reinterpret_cast<FetchContext*>(fetch->userData)); |
344 | 344 |
345 #if 0 | |
345 { | 346 { |
346 const size_t kEmscriptenStatusTextSize = sizeof(emscripten_fetch_t::statusText); | 347 const size_t kEmscriptenStatusTextSize = sizeof(emscripten_fetch_t::statusText); |
347 char message[kEmscriptenStatusTextSize + 1]; | 348 char message[kEmscriptenStatusTextSize + 1]; |
348 memcpy(message, fetch->statusText, kEmscriptenStatusTextSize); | 349 memcpy(message, fetch->statusText, kEmscriptenStatusTextSize); |
349 message[kEmscriptenStatusTextSize] = 0; | 350 message[kEmscriptenStatusTextSize] = 0; |
350 | 351 |
351 /*LOG(ERROR) << "Fetching " << fetch->url | 352 LOG(ERROR) << "Fetching " << fetch->url |
352 << " failed, HTTP failure status code: " << fetch->status | 353 << " failed, HTTP failure status code: " << fetch->status |
353 << " | statusText = " << message | 354 << " | statusText = " << message |
354 << " | numBytes = " << fetch->numBytes | 355 << " | numBytes = " << fetch->numBytes |
355 << " | totalBytes = " << fetch->totalBytes | 356 << " | totalBytes = " << fetch->totalBytes |
356 << " | readyState = " << fetch->readyState;*/ | 357 << " | readyState = " << fetch->readyState; |
357 } | 358 } |
359 #endif | |
358 | 360 |
359 { | 361 { |
360 OracleCommandExceptionMessage message | 362 OracleCommandExceptionMessage message |
361 (context->GetCommand(), Orthanc::OrthancException(Orthanc::ErrorCode_NetworkProtocol)); | 363 (context->GetCommand(), Orthanc::OrthancException(Orthanc::ErrorCode_NetworkProtocol)); |
362 context->EmitMessage(message); | 364 context->EmitMessage(message); |