[Libreoffice-commits] core.git: scripting/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Aug 16 11:06:30 UTC 2019
scripting/source/pyprov/pythonscript.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
New commits:
commit 9a97a26511584f41c3753fa9536e1c4a8dce637a
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Aug 16 10:38:18 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Aug 16 13:05:52 2019 +0200
member 'Context' of struct type 'uno.Exception' not given a value
Change-Id: Ie80f729e5c1dbf3214f9532dcb935b239bac7997
Reviewed-on: https://gerrit.libreoffice.org/77566
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py
index 67251e6ada61..bd2aa3e1670e 100644
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -176,6 +176,7 @@ def toIniName( str ):
class MyUriHelper:
def __init__( self, ctx, location ):
+ self.ctx = ctx
self.s_UriMap = \
{ "share" : "vnd.sun.star.expand:$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/Scripts/python" , \
"share:uno_packages" : "vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE/uno_packages", \
@@ -203,7 +204,7 @@ class MyUriHelper:
if not storageURI.startswith( self.m_baseUri ):
message = "pythonscript: storage uri '" + storageURI + "' not in base uri '" + self.m_baseUri + "'"
log.debug( message )
- raise RuntimeException( message )
+ raise RuntimeException( message, self.ctx )
ret = "vnd.sun.star.script:" + \
storageURI[len(self.m_baseUri)+1:].replace("/","|") + \
@@ -235,12 +236,12 @@ class MyUriHelper:
if not xFileUri:
message = "pythonscript: invalid relative uri '" + sFileUri+ "'"
log.debug( message )
- raise RuntimeException( message )
+ raise RuntimeException( message, self.ctx )
if xFileUri.isAbsolute():
message = "pythonscript: an absolute uri is invalid '" + sFileUri+ "'"
log.debug( message )
- raise RuntimeException( message )
+ raise RuntimeException( message, self.ctx )
# absolute path to the .py file
xAbsScriptUri = self.m_uriRefFac.makeAbsolute(xBaseUri, xFileUri, True, RETAIN)
@@ -250,7 +251,7 @@ class MyUriHelper:
if not sAbsScriptUri.startswith(sBaseUri):
message = "pythonscript: storage uri '" + sAbsScriptUri + "' not in base uri '" + self.m_baseUri + "'"
log.debug( message )
- raise RuntimeException( message )
+ raise RuntimeException( message, self.ctx )
ret = sAbsScriptUri
if funcNameStart != -1:
@@ -259,10 +260,10 @@ class MyUriHelper:
return ret
except UnoException as e:
log.error( "error during converting scriptURI="+scriptURI + ": " + e.Message)
- raise RuntimeException( "pythonscript:scriptURI2StorageUri: " + e.Message, None )
+ raise RuntimeException( "pythonscript:scriptURI2StorageUri: " + e.Message, self.ctx )
except Exception as e:
log.error( "error during converting scriptURI="+scriptURI + ": " + str(e))
- raise RuntimeException( "pythonscript:scriptURI2StorageUri: " + str(e), None )
+ raise RuntimeException( "pythonscript:scriptURI2StorageUri: " + str(e), self.ctx )
class ModuleEntry:
More information about the Libreoffice-commits
mailing list