changeset 441:56ddca73396c am-vsol-upgrade

allow null callbacks for HTTP requests
author Alain Mazy <alain@mazy.be>
date Mon, 14 Jan 2019 11:27:26 +0100
parents a750f11892ec
children e9f84e52aad2
files Platforms/Wasm/WasmWebService.cpp
diffstat 1 files changed, 2 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/Platforms/Wasm/WasmWebService.cpp	Fri Dec 28 10:40:34 2018 +0100
+++ b/Platforms/Wasm/WasmWebService.cpp	Mon Jan 14 11:27:26 2019 +0100
@@ -45,11 +45,7 @@
                                                        const char* uri,
                                                        void* payload)
   {
-    if (failureCallable == NULL)
-    {
-      throw;
-    }
-    else
+    if (failureCallable != NULL)
     {
       reinterpret_cast<OrthancStone::MessageHandler<OrthancStone::IWebService::HttpRequestErrorMessage>*>(failureCallable)->
         Apply(OrthancStone::IWebService::HttpRequestErrorMessage(uri, reinterpret_cast<Orthanc::IDynamicObject*>(payload)));
@@ -77,11 +73,7 @@
                                                          const char* answerHeaders,
                                                          void* payload)
   {
-    if (successCallable == NULL)
-    {
-      throw;
-    }
-    else
+    if (successCallable != NULL)
     {
       OrthancStone::IWebService::HttpHeaders headers;