]> gerrit.simantics Code Review - simantics/python.git/blobdiff - org.simantics.pythonlink/src/org/simantics/pythonlink/PythonContext.java
Report and log failure of Python DLL loading
[simantics/python.git] / org.simantics.pythonlink / src / org / simantics / pythonlink / PythonContext.java
index cceace3c4d1b2bf9b372eeb4182d50eede2ba794..77701ef5b352423e18d66ae90790dc296c178091 100644 (file)
@@ -57,6 +57,10 @@ public class PythonContext implements Closeable {
     };
     
     private static synchronized void ensurePythonInit() {
+       if (!Activator.isPythonLoaded()) {
+               throw new PythonException("Python interpreter has not been successfully loaded. Check availablility of python3.dll in path.");
+       }
+       
                if (!isPyInitialized) {
                        execute(() -> initializePython(pythonWriter));
                        isPyInitialized = true;