diff Sources/PythonLock.cpp @ 63:32de70a1e4c7

New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 10 Jun 2021 18:19:27 +0200
parents 23f3099bed47
children cbfc72a53970
line wrap: on
line diff
--- a/Sources/PythonLock.cpp	Fri May 28 10:53:18 2021 +0200
+++ b/Sources/PythonLock.cpp	Thu Jun 10 18:19:27 2021 +0200
@@ -291,6 +291,23 @@
 
 
 
+OrthancPluginErrorCode PythonLock::CheckCallbackSuccess(const std::string& callbackDetails)
+{
+  std::string traceback;
+  
+  if (HasErrorOccurred(traceback))
+  {
+    OrthancPlugins::LogError("Error in the " + callbackDetails + ", traceback:\n" + traceback);
+    return OrthancPluginErrorCode_Plugin;
+  }
+  else
+  {
+    return OrthancPluginErrorCode_Success;
+  }
+}
+
+
+
 void PythonLock::GlobalInitialize(const std::string& moduleName,
                                   const std::string& exceptionName,
                                   ModuleFunctionsInstaller moduleFunctions,