Mercurial > hg > orthanc-stone
comparison Framework/Oracle/WebAssemblyOracle.cpp @ 959:13e078adfb94 toa2019082301
Better error log in fetch failure callback +
timeout 600sec in OrthancRestApiCommand +
guard against dead controller access in PanSceneTracker +
relaxed DicomStructureSet AddReferenceSlice method to accept extraneous adds
of the same slice (while trying to understand how it happens in the first place)
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Fri, 23 Aug 2019 14:16:45 +0200 |
parents | a7351ad54960 |
children | 91f827272c1f |
comparison
equal
deleted
inserted
replaced
958:769249e1f3b4 | 959:13e078adfb94 |
---|---|
235 | 235 |
236 static void FailureCallback(emscripten_fetch_t *fetch) | 236 static void FailureCallback(emscripten_fetch_t *fetch) |
237 { | 237 { |
238 std::auto_ptr<FetchContext> context(reinterpret_cast<FetchContext*>(fetch->userData)); | 238 std::auto_ptr<FetchContext> context(reinterpret_cast<FetchContext*>(fetch->userData)); |
239 | 239 |
240 LOG(ERROR) << "Fetching " << fetch->url << " failed, HTTP failure status code: " << fetch->status; | 240 const size_t kEmscriptenStatusTextSize = sizeof(emscripten_fetch_t::statusText); |
241 char message[kEmscriptenStatusTextSize + 1]; | |
242 memcpy(message, fetch->statusText, kEmscriptenStatusTextSize); | |
243 message[kEmscriptenStatusTextSize] = 0; | |
244 | |
245 LOG(ERROR) << "Fetching " << fetch->url | |
246 << " failed, HTTP failure status code: " << fetch->status | |
247 << " | statusText = " << message | |
248 << " | numBytes = " << fetch->numBytes | |
249 << " | totalBytes = " << fetch->totalBytes | |
250 << " | readyState = " << fetch->readyState; | |
241 | 251 |
242 /** | 252 /** |
243 * TODO - The following code leads to an infinite recursion, at | 253 * TODO - The following code leads to an infinite recursion, at |
244 * least with Firefox running on incognito mode => WHY? | 254 * least with Firefox running on incognito mode => WHY? |
245 **/ | 255 **/ |
246 //emscripten_fetch_close(fetch); // Also free data on failure. | 256 emscripten_fetch_close(fetch); // Also free data on failure. |
247 } | 257 } |
248 }; | 258 }; |
249 | 259 |
250 | 260 |
251 | 261 |