8000 Improved logging of library loading in PythonUtil.java · hackalog/python-for-android@9afdc77 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9afdc77

Browse files
committed
Improved logging of library loading in PythonUtil.java
1 parent 0600e03 commit 9afdc77

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pythonforandroid/bootstraps/sdl2/build/src/org/kivy/android/PythonUtil.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public static void loadLibraries(File filesDir) {
2727
boolean foundPython = false;
2828

2929
for (String lib : getLibraries()) {
30+
Log.v("python", "Loading library: " + lib);
3031
try {
3132
System.loadLibrary(lib);
3233
if (lib.startsWith("python")) {
@@ -36,10 +37,15 @@ public static void loadLibraries(File filesDir) {
3637
// If this is the last possible libpython
3738
// load, and it has failed, give a more
3839
// general error
40+
Log.v("python", "Library loading error: " + e.getMessage());
3941
if (lib.startsWith("python3.6") && !foundPython) {
4042
throw new java.lang.RuntimeException("Could not load any libpythonXXX.so");
43+
} else if (lib.startsWith("python")) {
44+
continue;
45+
} else {
46+
Log.v("python", "An UnsatisfiedLinkError occurred loading " + lib);
47+
throw e;
4148
}
42-
continue;
4349
}
4450
}
4551

0 commit comments

Comments
 (0)
0