[Libreoffice-commits] .: 2 commits - scripting/java store/source

Stephan Bergmann sbergmann at kemper.freedesktop.org
Fri Mar 23 09:46:14 PDT 2012


 scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java |   32 +++++++---
 store/source/lockbyte.cxx                                                 |    2 
 2 files changed, 24 insertions(+), 10 deletions(-)

New commits:
commit 5cfea7f88532a8f2e3ae069ebd9258825f20df0b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Mar 23 17:37:33 2012 +0100

    Make default zero-initialization explicit
    
    ...to match style used for other data members.

diff --git a/store/source/lockbyte.cxx b/store/source/lockbyte.cxx
index 1a8bf81..7c02c22 100644
--- a/store/source/lockbyte.cxx
+++ b/store/source/lockbyte.cxx
@@ -478,7 +478,7 @@ struct FileMapping
     sal_uInt32  m_nSize;
     oslFileHandle m_hFile;
 
-    FileMapping() : m_pAddr(0), m_nSize(0), m_hFile() {}
+    FileMapping() : m_pAddr(0), m_nSize(0), m_hFile(0) {}
 
     bool operator != (FileMapping const & rhs) const
     {
commit c65ae8762b5ce302d07bfa7f5432fd3560133dc2
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Mar 23 17:33:56 2012 +0100

    Improve error reporting

diff --git a/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java b/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java
index 286d154..71db252 100644
--- a/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java
+++ b/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java
@@ -148,9 +148,11 @@ public abstract class ScriptProvider
         catch ( Exception e )
         {
             LogUtils.DEBUG( LogUtils.getTrace( e ) );
-            throw new com.sun.star.uno.RuntimeException(
-                "Error constructing  ScriptProvider: "
-                + e.getMessage() );
+            com.sun.star.uno.RuntimeException e2 =
+                new com.sun.star.uno.RuntimeException(
+                    "Error constructing  ScriptProvider: " + e );
+            e2.initCause( e );
+            throw e2;
         }
 
         LogUtils.DEBUG( "ScriptProvider: constructor - finished." );
@@ -383,13 +385,21 @@ public abstract class ScriptProvider
         catch (  com.sun.star.lang.IllegalArgumentException ila )
         {
             // TODO specify the correct error Type
-            throw new ScriptFrameworkErrorException( ila.getMessage(),
-                null, scriptURI, language, ScriptFrameworkErrorType.UNKNOWN );
+            ScriptFrameworkErrorException e2 =
+                new ScriptFrameworkErrorException(
+                    ila.getMessage(), null, scriptURI, language,
+                    ScriptFrameworkErrorType.UNKNOWN );
+            e2.initCause( ila );
+            throw e2;
         }
         catch ( com.sun.star.container.NoSuchElementException nse )
         {
-            throw new ScriptFrameworkErrorException( nse.getMessage(),
-                null, details.function, language, ScriptFrameworkErrorType.NO_SUCH_SCRIPT );
+            ScriptFrameworkErrorException e2 =
+                new ScriptFrameworkErrorException(
+                    nse.getMessage(), null, details.function, language,
+                    ScriptFrameworkErrorType.NO_SUCH_SCRIPT );
+            e2.initCause( nse );
+            throw e2;
         }
         catch ( com.sun.star.lang.WrappedTargetException wta )
         {
@@ -400,8 +410,12 @@ public abstract class ScriptProvider
             {
                 message = wrapped.getMessage();
             }
-            throw new ScriptFrameworkErrorException( message,
-                null, details.function, language, ScriptFrameworkErrorType.UNKNOWN );
+            ScriptFrameworkErrorException e2 =
+                new ScriptFrameworkErrorException(
+                    message, null, details.function, language,
+                    ScriptFrameworkErrorType.UNKNOWN );
+            e2.initCause( wta );
+            throw e2;
         }
 
     }


More information about the Libreoffice-commits mailing list