summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripting/java/Framework/com/sun/star/script/framework/security/SecurityDialog.java10
-rw-r--r--scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java22
-rw-r--r--scripting/java/com/sun/star/script/framework/container/Parcel.java4
-rw-r--r--scripting/java/com/sun/star/script/framework/container/XMLParserFactory.java36
-rw-r--r--scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java14
-rw-r--r--scripting/java/com/sun/star/script/framework/io/XInputStreamWrapper.java31
-rw-r--r--scripting/java/com/sun/star/script/framework/io/XOutputStreamWrapper.java31
-rw-r--r--scripting/java/com/sun/star/script/framework/io/XStorageHelper.java6
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java4
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java4
-rw-r--r--wizards/com/sun/star/wizards/common/FileAccess.java3
-rw-r--r--wizards/com/sun/star/wizards/common/InvalidQueryException.java9
-rw-r--r--wizards/com/sun/star/wizards/common/NoValidPathException.java10
-rw-r--r--wizards/com/sun/star/wizards/common/NumericalHelper.java20
-rw-r--r--wizards/com/sun/star/wizards/common/Resource.java9
-rw-r--r--wizards/com/sun/star/wizards/common/SystemDialog.java3
-rw-r--r--wizards/com/sun/star/wizards/db/RecordParser.java3
-rw-r--r--wizards/com/sun/star/wizards/report/ReportLayouter.java3
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java2
19 files changed, 124 insertions, 100 deletions
diff --git a/scripting/java/Framework/com/sun/star/script/framework/security/SecurityDialog.java b/scripting/java/Framework/com/sun/star/script/framework/security/SecurityDialog.java
index b9df352d56e4..92f5ee777f97 100644
--- a/scripting/java/Framework/com/sun/star/script/framework/security/SecurityDialog.java
+++ b/scripting/java/Framework/com/sun/star/script/framework/security/SecurityDialog.java
@@ -165,7 +165,7 @@ public class SecurityDialog extends WeakBase implements
try {
checkBoxPath = AnyConverter.toString(args[0]);
} catch (IllegalArgumentException e) {
- throw new RuntimeException("SecurityDialog::initialize: " + e.getMessage());
+ throw new RuntimeException(e);
}
LogUtils.DEBUG("path: " + checkBoxPath);
@@ -189,13 +189,9 @@ public class SecurityDialog extends WeakBase implements
try {
_xDialog = createDialog();
} catch (com.sun.star.uno.Exception e) {
- LogUtils.DEBUG("Couldn't create dialog");
- LogUtils.DEBUG("uno message: " + e.getMessage());
- throw new RuntimeException(e.getMessage());
+ throw new RuntimeException(e);
} catch (Exception e) {
- LogUtils.DEBUG("Couldn't create dialog");
- LogUtils.DEBUG("message: " + e.getMessage());
- throw new RuntimeException(e.getMessage());
+ throw new RuntimeException(e);
}
}
diff --git a/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java
index e816f8e6dbd0..fe2efd939899 100644
--- a/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java
+++ b/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java
@@ -185,16 +185,12 @@ public class ScriptBrowseNode extends PropertySet implements
try {
data = (ScriptMetaData)parent.getByName(name);
} catch (NoSuchElementException nse) {
-
- throw new com.sun.star.lang.IllegalArgumentException(
+ throw new com.sun.star.lang.IllegalArgumentException(nse,
name + " does not exist or can't be found ");
-
} catch (com.sun.star.lang.WrappedTargetException wte) {
-
// rethrow
throw new InvocationTargetException(
"Scripting framework editing script ", null, wte.TargetException);
-
}
provider.getScriptEditor().edit(ctxt, data);
@@ -212,16 +208,12 @@ public class ScriptBrowseNode extends PropertySet implements
parent.removeByName(name);
result = new Any(new Type(Boolean.class), Boolean.TRUE);
} catch (NoSuchElementException nse) {
-
- throw new com.sun.star.lang.IllegalArgumentException(
+ throw new com.sun.star.lang.IllegalArgumentException(nse,
name + " does not exist or can't be found ");
-
} catch (WrappedTargetException wte) {
-
// rethrow
throw new InvocationTargetException(
"Scripting framework deleting script ", null, wte.TargetException);
-
}
} else if (aFunctionName.equals("Renamable")) {
@@ -263,28 +255,20 @@ public class ScriptBrowseNode extends PropertySet implements
name = languageName;
result = new Any(new Type(XBrowseNode.class), this);
} catch (NoSuchElementException nse) {
-
- throw new com.sun.star.lang.IllegalArgumentException(
+ throw new com.sun.star.lang.IllegalArgumentException(nse,
name + " does not exist or can't be found ");
-
} catch (ElementExistException eee) {
-
// rethrow
throw new InvocationTargetException(
"Scripting framework error renaming script ", null, eee);
-
} catch (WrappedTargetException wte) {
-
// rethrow
throw new InvocationTargetException(
"Scripting framework rename script ", null, wte.TargetException);
-
}
} else {
-
throw new com.sun.star.lang.IllegalArgumentException(
"Function " + aFunctionName + " not supported.");
-
}
return result;
diff --git a/scripting/java/com/sun/star/script/framework/container/Parcel.java b/scripting/java/com/sun/star/script/framework/container/Parcel.java
index 0c9d41d60ae8..df94463bb1eb 100644
--- a/scripting/java/com/sun/star/script/framework/container/Parcel.java
+++ b/scripting/java/com/sun/star/script/framework/container/Parcel.java
@@ -175,8 +175,8 @@ public class Parcel implements XNameContainer {
}
// TO DO should catch specified exceptions
- catch (Exception e) {
- throw new com.sun.star.lang.WrappedTargetException();
+ catch (Exception ex) {
+ throw new com.sun.star.lang.WrappedTargetException(ex);
}
}
diff --git a/scripting/java/com/sun/star/script/framework/container/XMLParserFactory.java b/scripting/java/com/sun/star/script/framework/container/XMLParserFactory.java
index 45b10e9df3df..0e25745a1b38 100644
--- a/scripting/java/com/sun/star/script/framework/container/XMLParserFactory.java
+++ b/scripting/java/com/sun/star/script/framework/container/XMLParserFactory.java
@@ -73,12 +73,18 @@ public class XMLParserFactory {
}
result = builder.parse(is);
- } catch (SAXParseException spe) {
- throw new IOException(spe.getMessage());
- } catch (SAXException se) {
- throw new IOException(se.getMessage());
- } catch (ParserConfigurationException pce) {
- throw new IOException(pce.getMessage());
+ } catch (SAXParseException ex1) {
+ IOException ex2 = new IOException();
+ ex2.initCause(ex1);
+ throw ex2;
+ } catch (SAXException ex1) {
+ IOException ex2 = new IOException();
+ ex2.initCause(ex1);
+ throw ex2;
+ } catch (ParserConfigurationException ex1) {
+ IOException ex2 = new IOException();
+ ex2.initCause(ex1);
+ throw ex2;
}
return result;
@@ -169,12 +175,18 @@ public class XMLParserFactory {
method.invoke(impl, new Object[] {doc});
}
- } catch (NoSuchMethodException ex) {
- throw new IOException(ex.getMessage());
- } catch (ClassNotFoundException ex) {
- throw new IOException(ex.getMessage());
- } catch (Exception ex) {
- throw new IOException(ex.getMessage());
+ } catch (NoSuchMethodException ex1) {
+ IOException ex2 = new IOException();
+ ex2.initCause(ex1);
+ throw ex2;
+ } catch (ClassNotFoundException ex1) {
+ IOException ex2 = new IOException();
+ ex2.initCause(ex1);
+ throw ex2;
+ } catch (Exception ex1) {
+ IOException ex2 = new IOException();
+ ex2.initCause(ex1);
+ throw ex2;
}
}
}
diff --git a/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java b/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java
index 79f933cdeae4..3c27b0367d38 100644
--- a/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java
+++ b/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java
@@ -255,12 +255,14 @@ public class UCBStreamHandler extends URLStreamHandler {
}
result = new ByteArrayInputStream(inputBytes[0]);
- } catch (com.sun.star.io.IOException ioe) {
- LogUtils.DEBUG("caught exception " + ioe);
- throw new IOException(ioe.getMessage());
- } catch (com.sun.star.uno.Exception e) {
- LogUtils.DEBUG("caught exception " + e);
- throw new IOException(e.getMessage());
+ } catch (com.sun.star.io.IOException ex1) {
+ IOException ex2 = new IOException();
+ ex2.initCause(ex1);
+ throw ex2;
+ } catch (com.sun.star.uno.Exception ex1) {
+ IOException ex2 = new IOException();
+ ex2.initCause(ex1);
+ throw ex2;
} finally {
if (xInputStream != null) {
try {
diff --git a/scripting/java/com/sun/star/script/framework/io/XInputStreamWrapper.java b/scripting/java/com/sun/star/script/framework/io/XInputStreamWrapper.java
index 402c1582ee45..10cb1db52888 100644
--- a/scripting/java/com/sun/star/script/framework/io/XInputStreamWrapper.java
+++ b/scripting/java/com/sun/star/script/framework/io/XInputStreamWrapper.java
@@ -19,6 +19,7 @@ package com.sun.star.script.framework.io;
import com.sun.star.io.XInputStream;
+import java.io.IOException;
import java.io.InputStream;
public class XInputStreamWrapper extends InputStream {
@@ -36,8 +37,10 @@ public class XInputStreamWrapper extends InputStream {
try {
numRead = m_xInputStream.readBytes(byteRet, 1);
- } catch (com.sun.star.io.IOException ioe) {
- throw new java.io.IOException(ioe.getMessage());
+ } catch (com.sun.star.io.IOException ex1) {
+ IOException ex2 = new IOException();
+ ex2.initCause(ex1);
+ throw ex2;
}
if (numRead != 1) {
@@ -54,8 +57,10 @@ public class XInputStreamWrapper extends InputStream {
try {
return m_xInputStream.readBytes(byteRet, b.length);
- } catch (com.sun.star.io.IOException ioe) {
- throw new java.io.IOException(ioe.getMessage());
+ } catch (com.sun.star.io.IOException ex1) {
+ IOException ex2 = new IOException();
+ ex2.initCause(ex1);
+ throw ex2;
}
}
@@ -64,8 +69,10 @@ public class XInputStreamWrapper extends InputStream {
try {
m_xInputStream.skipBytes((int)n);
return n;
- } catch (com.sun.star.io.IOException ioe) {
- throw new java.io.IOException(ioe.getMessage());
+ } catch (com.sun.star.io.IOException ex1) {
+ IOException ex2 = new IOException();
+ ex2.initCause(ex1);
+ throw ex2;
}
}
@@ -73,8 +80,10 @@ public class XInputStreamWrapper extends InputStream {
public int available() throws java.io.IOException {
try {
return m_xInputStream.available();
- } catch (com.sun.star.io.IOException ioe) {
- throw new java.io.IOException(ioe.getMessage());
+ } catch (com.sun.star.io.IOException ex1) {
+ IOException ex2 = new IOException();
+ ex2.initCause(ex1);
+ throw ex2;
}
}
@@ -82,8 +91,10 @@ public class XInputStreamWrapper extends InputStream {
public void close() throws java.io.IOException {
try {
m_xInputStream.closeInput();
- } catch (com.sun.star.io.IOException ioe) {
- throw new java.io.IOException(ioe.getMessage());
+ } catch (com.sun.star.io.IOException ex1) {
+ IOException ex2 = new IOException();
+ ex2.initCause(ex1);
+ throw ex2;
}
}
} \ No newline at end of file
diff --git a/scripting/java/com/sun/star/script/framework/io/XOutputStreamWrapper.java b/scripting/java/com/sun/star/script/framework/io/XOutputStreamWrapper.java
index 80ab81c60537..542fb0ae9422 100644
--- a/scripting/java/com/sun/star/script/framework/io/XOutputStreamWrapper.java
+++ b/scripting/java/com/sun/star/script/framework/io/XOutputStreamWrapper.java
@@ -19,6 +19,7 @@ package com.sun.star.script.framework.io;
import com.sun.star.io.XOutputStream;
+import java.io.IOException;
import java.io.OutputStream;
public class XOutputStreamWrapper extends OutputStream {
@@ -40,8 +41,10 @@ public class XOutputStreamWrapper extends OutputStream {
try {
m_xOutputStream.writeBytes(bytes);
- } catch (com.sun.star.io.IOException ioe) {
- throw new java.io.IOException(ioe.getMessage());
+ } catch (com.sun.star.io.IOException ex1) {
+ IOException ex2 = new IOException();
+ ex2.initCause(ex1);
+ throw ex2;
}
}
@@ -54,8 +57,10 @@ public class XOutputStreamWrapper extends OutputStream {
try {
m_xOutputStream.writeBytes(b);
- } catch (com.sun.star.io.IOException ioe) {
- throw new java.io.IOException(ioe.getMessage());
+ } catch (com.sun.star.io.IOException ex1) {
+ IOException ex2 = new IOException();
+ ex2.initCause(ex1);
+ throw ex2;
}
}
@Override
@@ -69,8 +74,10 @@ public class XOutputStreamWrapper extends OutputStream {
try {
m_xOutputStream.writeBytes(bytes);
- } catch (com.sun.star.io.IOException ioe) {
- throw new java.io.IOException(ioe.getMessage());
+ } catch (com.sun.star.io.IOException ex1) {
+ IOException ex2 = new IOException();
+ ex2.initCause(ex1);
+ throw ex2;
}
}
@@ -82,8 +89,10 @@ public class XOutputStreamWrapper extends OutputStream {
try {
m_xOutputStream.flush();
- } catch (com.sun.star.io.IOException ioe) {
- throw new java.io.IOException(ioe.getMessage());
+ } catch (com.sun.star.io.IOException ex1) {
+ IOException ex2 = new IOException();
+ ex2.initCause(ex1);
+ throw ex2;
}
}
@@ -95,8 +104,10 @@ public class XOutputStreamWrapper extends OutputStream {
try {
m_xOutputStream.closeOutput();
- } catch (com.sun.star.io.IOException ioe) {
- throw new java.io.IOException(ioe.getMessage());
+ } catch (com.sun.star.io.IOException ex1) {
+ IOException ex2 = new IOException();
+ ex2.initCause(ex1);
+ throw ex2;
}
}
} \ No newline at end of file
diff --git a/scripting/java/com/sun/star/script/framework/io/XStorageHelper.java b/scripting/java/com/sun/star/script/framework/io/XStorageHelper.java
index c0132cabc687..0856e6deb2f8 100644
--- a/scripting/java/com/sun/star/script/framework/io/XStorageHelper.java
+++ b/scripting/java/com/sun/star/script/framework/io/XStorageHelper.java
@@ -153,9 +153,11 @@ public class XStorageHelper implements XEventListener {
}
} catch (com.sun.star.io.IOException ioe) {
disposeObject();
- } catch (com.sun.star.uno.Exception e) {
+ } catch (com.sun.star.uno.Exception ex1) {
disposeObject();
- throw new IOException(e.getMessage());
+ IOException ex2 = new IOException();
+ ex2.initCause(ex1);
+ throw ex2;
}
}
diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java
index e4aa8fc56f7f..59004f02a6bb 100644
--- a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java
+++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java
@@ -144,9 +144,7 @@ class ScriptImpl implements XScript {
try {
this.m_xMultiComponentFactory = m_xContext.getServiceManager();
} catch (Exception e) {
- LogUtils.DEBUG(LogUtils.getTrace(e));
- throw new com.sun.star.uno.RuntimeException(
- "Error constructing ScriptImpl [beanshell]: " + e.getMessage());
+ throw new com.sun.star.uno.RuntimeException(e);
}
LogUtils.DEBUG("ScriptImpl [beanshell] script data = " + metaData);
diff --git a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java
index c347e8097b19..25edc0f851dd 100644
--- a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java
+++ b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java
@@ -139,9 +139,7 @@ class ScriptImpl implements XScript {
try {
this.m_xMultiComponentFactory = m_xContext.getServiceManager();
} catch (Exception e) {
- LogUtils.DEBUG(LogUtils.getTrace(e));
- throw new com.sun.star.uno.RuntimeException(
- "Error constructing ScriptImpl: [javascript]");
+ throw new com.sun.star.uno.RuntimeException(e);
}
LogUtils.DEBUG("ScriptImpl [javascript] script data = " + metaData);
diff --git a/wizards/com/sun/star/wizards/common/FileAccess.java b/wizards/com/sun/star/wizards/common/FileAccess.java
index 8e279668de62..6935c1f3e3c7 100644
--- a/wizards/com/sun/star/wizards/common/FileAccess.java
+++ b/wizards/com/sun/star/wizards/common/FileAccess.java
@@ -621,8 +621,7 @@ public class FileAccess
}
catch (com.sun.star.uno.Exception e)
{
- e.printStackTrace();
- throw new NoValidPathException(null, "Internal error.");
+ throw new NoValidPathException(null, "Internal error.", e);
}
for (int j = 0; j < FolderName.size(); j++)
diff --git a/wizards/com/sun/star/wizards/common/InvalidQueryException.java b/wizards/com/sun/star/wizards/common/InvalidQueryException.java
index a5e256c719d3..efe21aa68e26 100644
--- a/wizards/com/sun/star/wizards/common/InvalidQueryException.java
+++ b/wizards/com/sun/star/wizards/common/InvalidQueryException.java
@@ -21,10 +21,17 @@ import com.sun.star.lang.XMultiServiceFactory;
public class InvalidQueryException extends java.lang.Throwable
{
-// TODO don't show messages in Excetions
+ // TODO don't show messages in Exceptions
public InvalidQueryException(XMultiServiceFactory xMSF, String sCommand)
{
final int RID_REPORT = 2400;
SystemDialog.showErrorBox(xMSF, "ReportWizard", "dbw", RID_REPORT + 65, "<STATEMENT>", sCommand); // Querycreationnotpossible
}
+ // TODO don't show messages in Exceptions
+ public InvalidQueryException(XMultiServiceFactory xMSF, String sCommand, Throwable cause)
+ {
+ super(cause);
+ final int RID_REPORT = 2400;
+ SystemDialog.showErrorBox(xMSF, "ReportWizard", "dbw", RID_REPORT + 65, "<STATEMENT>", sCommand); // Querycreationnotpossible
+ }
}
diff --git a/wizards/com/sun/star/wizards/common/NoValidPathException.java b/wizards/com/sun/star/wizards/common/NoValidPathException.java
index f00be24997cf..074b8f52698d 100644
--- a/wizards/com/sun/star/wizards/common/NoValidPathException.java
+++ b/wizards/com/sun/star/wizards/common/NoValidPathException.java
@@ -31,4 +31,14 @@ public class NoValidPathException extends Exception
SystemDialog.showErrorBox(xMSF, "dbwizres", "dbw", 521); // OfficePathnotavailable
}
}
+
+ public NoValidPathException(XMultiServiceFactory xMSF, String _sText, Throwable cause)
+ {
+ super(_sText, cause);
+ // TODO: NEVER open a dialog in an exception
+ if (xMSF != null)
+ {
+ SystemDialog.showErrorBox(xMSF, "dbwizres", "dbw", 521); // OfficePathnotavailable
+ }
+ }
}
diff --git a/wizards/com/sun/star/wizards/common/NumericalHelper.java b/wizards/com/sun/star/wizards/common/NumericalHelper.java
index f460ec43278a..1d5e4833e040 100644
--- a/wizards/com/sun/star/wizards/common/NumericalHelper.java
+++ b/wizards/com/sun/star/wizards/common/NumericalHelper.java
@@ -119,7 +119,7 @@ public class NumericalHelper
}
catch (java.lang.NumberFormatException e)
{
- throw new com.sun.star.lang.IllegalArgumentException(
+ throw new com.sun.star.lang.IllegalArgumentException(e,
"Cannot convert to byte: " + aTypeObject.aValue);
}
break;
@@ -181,7 +181,7 @@ public class NumericalHelper
}
catch (java.lang.NumberFormatException e)
{
- throw new com.sun.star.lang.IllegalArgumentException(
+ throw new com.sun.star.lang.IllegalArgumentException(e,
"Cannot convert to char: " + aTypeObject.aValue);
}
break;
@@ -234,7 +234,7 @@ public class NumericalHelper
}
catch (java.lang.NumberFormatException e)
{
- throw new com.sun.star.lang.IllegalArgumentException(
+ throw new com.sun.star.lang.IllegalArgumentException(e,
"Cannot convert to short: " + aTypeObject.aValue);
}
break;
@@ -423,7 +423,7 @@ public class NumericalHelper
}
catch (java.lang.NumberFormatException e)
{
- throw new com.sun.star.lang.IllegalArgumentException(
+ throw new com.sun.star.lang.IllegalArgumentException(e,
"Cannot convert to int: " + aTypeObject.aValue);
}
break;
@@ -476,7 +476,7 @@ public class NumericalHelper
}
catch (java.lang.NumberFormatException e)
{
- throw new com.sun.star.lang.IllegalArgumentException(
+ throw new com.sun.star.lang.IllegalArgumentException(e,
"Cannot convert to short: " + aTypeObject.aValue);
}
break;
@@ -529,7 +529,7 @@ public class NumericalHelper
}
catch (java.lang.NumberFormatException e)
{
- throw new com.sun.star.lang.IllegalArgumentException(
+ throw new com.sun.star.lang.IllegalArgumentException(e,
"Cannot convert to short: " + aTypeObject.aValue);
}
break;
@@ -582,7 +582,7 @@ public class NumericalHelper
}
catch (java.lang.NumberFormatException e)
{
- throw new com.sun.star.lang.IllegalArgumentException(
+ throw new com.sun.star.lang.IllegalArgumentException(e,
"Cannot convert to short: " + aTypeObject.aValue);
}
break;
@@ -683,7 +683,7 @@ public class NumericalHelper
}
catch (java.lang.NumberFormatException e)
{
- throw new com.sun.star.lang.IllegalArgumentException(
+ throw new com.sun.star.lang.IllegalArgumentException(e,
"Cannot convert to short: " + aTypeObject.aValue);
}
break;
@@ -1314,8 +1314,8 @@ public class NumericalHelper
catch (java.lang.ClassCastException e)
{
// unknown type cannot be converted
- throw new com.sun.star.lang.IllegalArgumentException(
- "Cannot convert unknown type: '" + e.getMessage() + "'");
+ throw new com.sun.star.lang.IllegalArgumentException(e,
+ "Cannot convert unknown type " +array.getClass());
}
}
return aShortVal;
diff --git a/wizards/com/sun/star/wizards/common/Resource.java b/wizards/com/sun/star/wizards/common/Resource.java
index 0ea3f5dd3de7..9f8f6da67f76 100644
--- a/wizards/com/sun/star/wizards/common/Resource.java
+++ b/wizards/com/sun/star/wizards/common/Resource.java
@@ -79,8 +79,7 @@ public class Resource
}
catch (Exception exception)
{
- exception.printStackTrace();
- throw new java.lang.IllegalArgumentException("Resource with ID not " + String.valueOf(nID) + "not found");
+ throw new java.lang.IllegalArgumentException("Resource with ID not " + String.valueOf(nID) + "not found", exception);
}
}
@@ -92,8 +91,7 @@ public class Resource
}
catch (Exception exception)
{
- exception.printStackTrace();
- throw new java.lang.IllegalArgumentException("Resource with ID not " + String.valueOf(nID) + "not found");
+ throw new java.lang.IllegalArgumentException("Resource with ID not " + String.valueOf(nID) + "not found", exception);
}
}
@@ -110,8 +108,7 @@ public class Resource
}
catch (Exception exception)
{
- exception.printStackTrace(System.err);
- throw new java.lang.IllegalArgumentException("Resource with ID not" + String.valueOf(nID) + "not found");
+ throw new java.lang.IllegalArgumentException("Resource with ID not" + String.valueOf(nID) + "not found", exception);
}
}
diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.java b/wizards/com/sun/star/wizards/common/SystemDialog.java
index 0349954d556a..62ebeb5bffde 100644
--- a/wizards/com/sun/star/wizards/common/SystemDialog.java
+++ b/wizards/com/sun/star/wizards/common/SystemDialog.java
@@ -153,8 +153,7 @@ public class SystemDialog
}
catch (com.sun.star.lang.IllegalArgumentException iae)
{
- iae.printStackTrace();
- throw new IllegalArgumentException(iae.getMessage());
+ throw new IllegalArgumentException(iae);
}
xFolderPicker.setTitle(title);
xFolderPicker.setDescription(description);
diff --git a/wizards/com/sun/star/wizards/db/RecordParser.java b/wizards/com/sun/star/wizards/db/RecordParser.java
index 3bc754fff8a9..d8acade3eaae 100644
--- a/wizards/com/sun/star/wizards/db/RecordParser.java
+++ b/wizards/com/sun/star/wizards/db/RecordParser.java
@@ -221,8 +221,7 @@ public class RecordParser extends QueryMetaData
}
catch (Exception exception)
{
- exception.printStackTrace(System.err);
- throw new InvalidQueryException(xMSF, Command);
+ throw new InvalidQueryException(xMSF, Command, exception);
}
}
diff --git a/wizards/com/sun/star/wizards/report/ReportLayouter.java b/wizards/com/sun/star/wizards/report/ReportLayouter.java
index 022e96de2082..953e532c4e81 100644
--- a/wizards/com/sun/star/wizards/report/ReportLayouter.java
+++ b/wizards/com/sun/star/wizards/report/ReportLayouter.java
@@ -420,8 +420,7 @@ public class ReportLayouter
}
catch (Exception ex)
{
- ex.printStackTrace();
- throw new IllegalArgumentException("Fatal Error: Loading template failed: searching fillins failed");
+ throw new IllegalArgumentException("Fatal Error: Loading template failed: searching fillins failed", ex);
}
}
}
diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java b/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java
index 2315ea5bead9..02548d0c7bc6 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java
@@ -276,7 +276,7 @@ public class DesignTemplate
{
// this should not happen
a = null;
- throw new java.lang.RuntimeException(e.getMessage());
+ throw new java.lang.RuntimeException(e);
}
catch (com.sun.star.uno.Exception e)
{