summaryrefslogtreecommitdiff
path: root/odk
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-10-16 12:19:14 +0200
committerNoel Grandin <noel@peralex.com>2014-10-16 12:27:15 +0200
commit9341bf3dc38b2cc117ffbe12ff057511ed6e046d (patch)
tree3a54c1764eb0e3106695292a737944507d3b4fb6 /odk
parentb2f69f626409442d1f0ca5049b946946ce9b01d8 (diff)
java: when rethrowing, store the original exception
Change-Id: I34ce000c48d2d79bfec854c8dd55d12f2bee29c7
Diffstat (limited to 'odk')
-rw-r--r--odk/examples/DevelopersGuide/GUI/DialogDocument.java6
-rw-r--r--odk/examples/DevelopersGuide/GUI/ImageControlSample.java2
-rw-r--r--odk/examples/DevelopersGuide/GUI/UnoDialogSample.java2
-rw-r--r--odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java2
-rw-r--r--odk/examples/DevelopersGuide/GUI/UnoMenu.java4
-rw-r--r--odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/ConnectionAwareClient.java3
6 files changed, 8 insertions, 11 deletions
diff --git a/odk/examples/DevelopersGuide/GUI/DialogDocument.java b/odk/examples/DevelopersGuide/GUI/DialogDocument.java
index 570f5b2a78f5..fd5df052b05b 100644
--- a/odk/examples/DevelopersGuide/GUI/DialogDocument.java
+++ b/odk/examples/DevelopersGuide/GUI/DialogDocument.java
@@ -134,11 +134,9 @@ public class DialogDocument extends UnoDialogSample {
aPropertyValues[1] = aPropertyValue;
xComponentLoader.loadComponentFromURL(_sUrl, "_self", 0, aPropertyValues);
} catch (com.sun.star.lang.IllegalArgumentException ex) {
- ex.printStackTrace();
- throw new java.lang.RuntimeException("cannot happen...");
+ throw new java.lang.RuntimeException("cannot happen...", ex);
} catch (com.sun.star.uno.Exception ex) {
- ex.printStackTrace();
- throw new java.lang.RuntimeException("cannot happen...");
+ throw new java.lang.RuntimeException("cannot happen...", ex);
}
}
diff --git a/odk/examples/DevelopersGuide/GUI/ImageControlSample.java b/odk/examples/DevelopersGuide/GUI/ImageControlSample.java
index 7415b055bb92..d808b78af69a 100644
--- a/odk/examples/DevelopersGuide/GUI/ImageControlSample.java
+++ b/odk/examples/DevelopersGuide/GUI/ImageControlSample.java
@@ -158,6 +158,6 @@ public class ImageControlSample extends UnoDialogSample{
xGraphic = xGraphicProvider.queryGraphic(aPropertyValues);
return xGraphic;
}catch (com.sun.star.uno.Exception ex){
- throw new java.lang.RuntimeException("cannot happen...");
+ throw new java.lang.RuntimeException("cannot happen...", ex);
}}
}
diff --git a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
index 6fa8055d3a11..d2730e0f3e54 100644
--- a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
+++ b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
@@ -1240,7 +1240,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// finally set the created pointer at the windowpeer of the control
xControl.getPeer().setPointer(xPointer);
} catch (com.sun.star.uno.Exception ex) {
- throw new java.lang.RuntimeException("cannot happen...");
+ throw new java.lang.RuntimeException("cannot happen...", ex);
}
}
diff --git a/odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java b/odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java
index f3ba77ac6206..27c578ba4270 100644
--- a/odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java
+++ b/odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java
@@ -223,7 +223,7 @@ public class UnoDialogSample2 extends UnoDialogSample {
new Object[] {Boolean.FALSE, Integer.valueOf(_nHeight), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Boolean.TRUE, Integer.valueOf(_nStep), _sStringItemList, Integer.valueOf(_nWidth)});
m_xDlgModelNameContainer.insertByName(sName, xLBModelMPSet);
}catch (com.sun.star.uno.Exception ex) {
- throw new java.lang.RuntimeException("cannot happen...");
+ throw new java.lang.RuntimeException("cannot happen...", ex);
}
return xListBox;
}
diff --git a/odk/examples/DevelopersGuide/GUI/UnoMenu.java b/odk/examples/DevelopersGuide/GUI/UnoMenu.java
index 5dbb0154484c..b6e9533ecb8a 100644
--- a/odk/examples/DevelopersGuide/GUI/UnoMenu.java
+++ b/odk/examples/DevelopersGuide/GUI/UnoMenu.java
@@ -84,7 +84,7 @@ public UnoMenu(XComponentContext _xContext, XMultiComponentFactory _xMCF) {
xPopupMenu.addMenuListener(this);
}catch( Exception e ) {
- throw new java.lang.RuntimeException("cannot happen...");
+ throw new java.lang.RuntimeException("cannot happen...", e);
}
return xPopupMenu;
}
@@ -102,7 +102,7 @@ public UnoMenu(XComponentContext _xContext, XMultiComponentFactory _xMCF) {
xMenuBar.addMenuListener(_xMenuListener);
_xTopWindow.setMenuBar(xMenuBar);
}catch( Exception e ) {
- throw new java.lang.RuntimeException("cannot happen...");
+ throw new java.lang.RuntimeException("cannot happen...", e);
}}
protected void closeDialog(){
diff --git a/odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/ConnectionAwareClient.java b/odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/ConnectionAwareClient.java
index 4cf807828b5c..2a1d3836517f 100644
--- a/odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/ConnectionAwareClient.java
+++ b/odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/ConnectionAwareClient.java
@@ -122,8 +122,7 @@ public class ConnectionAwareClient extends java.awt.Frame
catch ( com.sun.star.uno.Exception exc )
{
_txtLabel.setText( exc.getMessage() );
- exc.printStackTrace();
- throw new java.lang.RuntimeException( exc.getMessage() );
+ throw new java.lang.RuntimeException( exc );
}
}