Author: chathura
Date: Sun Jan 13 21:35:16 2008
New Revision: 12183

Log:


More improvements to exception handling.



Modified:
   
trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/InMemoryJDBCRegistry.java
   
trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/realm/RegistryRealm.java
   
trunk/registry/modules/core/src/main/java/org/wso2/registry/secure/HSQLDBInitializer.java

Modified: 
trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/InMemoryJDBCRegistry.java
==============================================================================
--- 
trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/InMemoryJDBCRegistry.java
  (original)
+++ 
trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/InMemoryJDBCRegistry.java
  Sun Jan 13 21:35:16 2008
@@ -83,7 +83,7 @@
 
         } catch (SQLException e) {
             String message = Messages.getMessage("database.error");
-            throw new RegistryException(message);
+            throw new RegistryException(message, e);
         }
     }
 }

Modified: 
trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/realm/RegistryRealm.java
==============================================================================
--- 
trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/realm/RegistryRealm.java
   (original)
+++ 
trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/realm/RegistryRealm.java
   Sun Jan 13 21:35:16 2008
@@ -67,7 +67,7 @@
         } catch (UserManagerException e) {
             String msg = "Could not initiate a user manager realm using the 
given data source. " +
                          "Caused by: " + e.getMessage();
-            throw new RegistryException(msg);
+            throw new RegistryException(msg, e);
         }
     }
 }

Modified: 
trunk/registry/modules/core/src/main/java/org/wso2/registry/secure/HSQLDBInitializer.java
==============================================================================
--- 
trunk/registry/modules/core/src/main/java/org/wso2/registry/secure/HSQLDBInitializer.java
   (original)
+++ 
trunk/registry/modules/core/src/main/java/org/wso2/registry/secure/HSQLDBInitializer.java
   Sun Jan 13 21:35:16 2008
@@ -41,7 +41,7 @@
         } catch (SQLException e) {
             String msg = "Could not get the HSQL DB connection for creating 
tables.";
             log.fatal(msg, e);
-            throw new RegistryException(msg);
+            throw new RegistryException(msg, e);
         }
 
         try {
@@ -61,7 +61,7 @@
         } catch (SQLException e) {
             String msg = "Could not get the metadata of the User Manager 
database.";
             log.fatal(msg, e);
-            throw new RegistryException(msg);
+            throw new RegistryException(msg, e);
         }
 
         try {
@@ -71,11 +71,11 @@
         } catch (UserManagerException e) {
             String msg = "Could not create tables for user manager";
             log.fatal(msg, e);
-            throw new RegistryException(msg);
+            throw new RegistryException(msg, e);
         } catch (SQLException e) {
             String msg = "Could not create tables for the User Manager.";
             log.fatal(msg, e);
-            throw new RegistryException(msg);
+            throw new RegistryException(msg, e);
 
         } finally {
             try {

_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev

Reply via email to