Improve pyuno debugging in various ways - add stack traces etc.

This commit is contained in:
Michael Meeks
2011-12-05 19:44:49 +00:00
parent 41b8bad143
commit 1a7eee2446
3 changed files with 11 additions and 5 deletions

View File

@@ -111,7 +111,8 @@ class Loader( XImplementationLoader, XServiceInfo, unohelper.Base ):
g_loadedComponents[url] = mod
return mod
elif "vnd.openoffice.pymodule" == protocol:
print ("here")
# the failure is on symbol lookup later in the parent ...
print ("Warning: Python module loading is almost certainly pre-broken")
nSlash = dependent.rfind('/')
if -1 != nSlash:
path = unohelper.fileUrlToSystemPath( dependent[0:nSlash] )
@@ -127,7 +128,8 @@ class Loader( XImplementationLoader, XServiceInfo, unohelper.Base ):
protocol + " in url " +url, self )
except Exception as e:
if DEBUG:
print ("Python import error " + str(e) + " args " + str(e.args));
print ("Python import exception " + str(type(e)) +
" message " + str(e) + " args " + str(e.args));
raise RuntimeException( "Couldn't load " + url + " for reason " + str(e), None )
return None