Kaydet (Commit) 791ed2c6 authored tarafından Robert Antoni Buj i Gelonch's avatar Robert Antoni Buj i Gelonch Kaydeden (comit) Noel Grandin

scripting: use new exception constructors

Change-Id: I7eeece85d4e462bf2df010ee29c062941a677759
Reviewed-on: https://gerrit.libreoffice.org/11966Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
Tested-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 530f060e
......@@ -193,10 +193,7 @@ public class ParcelContainer implements XNameAccess {
name = decodedUrl.substring(indexOfSlash + 1);
}
} catch (UnsupportedEncodingException e) {
com.sun.star.uno.RuntimeException e2 =
new com.sun.star.uno.RuntimeException();
e2.initCause(e);
throw e2;
throw new com.sun.star.uno.RuntimeException(e);
}
} else {
name = "document";
......
......@@ -218,9 +218,9 @@ public class ScriptMetaData extends ScriptEntry {
if (url != null) {
classPathVec.add(url);
}
}
}
return classPathVec.toArray(new URL[classPathVec.size()]);
return classPathVec.toArray(new URL[classPathVec.size()]);
} catch (Exception e) {
LogUtils.DEBUG("Failed to build class path " + e.toString());
LogUtils.DEBUG(LogUtils.getTrace(e));
......
......@@ -117,7 +117,8 @@ public class UCBStreamHandler extends URLStreamHandler {
try {
String sUrl = url.toString();
if ( sUrl.lastIndexOf(separator) != -1 ) {
if (sUrl.lastIndexOf(separator) != -1) {
String path = sUrl.substring(0, sUrl.lastIndexOf(separator));
if (m_xSimpleFileAccess.isReadOnly(path)) {
......
......@@ -131,10 +131,8 @@ public abstract class ScriptProvider implements
} catch (Exception e) {
LogUtils.DEBUG(LogUtils.getTrace(e));
com.sun.star.uno.RuntimeException e2 = new com.sun.star.uno.RuntimeException(
"Error constructing ScriptProvider: " + e);
e2.initCause(e);
throw e2;
throw new com.sun.star.uno.RuntimeException(
e, "Error constructing ScriptProvider: " + e);
}
LogUtils.DEBUG("ScriptProvider: constructor - finished.");
......
......@@ -147,10 +147,8 @@ class ScriptImpl implements XScript {
this.m_xMultiComponentFactory = m_xContext.getServiceManager();
} catch (Exception e) {
LogUtils.DEBUG(LogUtils.getTrace(e));
com.sun.star.uno.RuntimeException e2 = new com.sun.star.uno.RuntimeException(
"Error constructing ScriptProvider: " + e);
e2.initCause(e);
throw e2;
throw new com.sun.star.uno.RuntimeException(
e, "Error constructing ScriptProvider: " + e);
}
LogUtils.DEBUG("ScriptImpl [java] script data = " + metaData);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment