| 
      
      
      From: <fu...@us...> - 2010-01-07 20:18:22
      
     | 
| Revision: 1015
          http://cishell.svn.sourceforge.net/cishell/?rev=1015&view=rev
Author:   fugu13
Date:     2010-01-07 20:18:16 +0000 (Thu, 07 Jan 2010)
Log Message:
-----------
Add configurable error message.
Modified Paths:
--------------
    trunk/core/org.cishell.utilities/src/org/cishell/utilities/DatabaseUtilities.java
Modified: trunk/core/org.cishell.utilities/src/org/cishell/utilities/DatabaseUtilities.java
===================================================================
--- trunk/core/org.cishell.utilities/src/org/cishell/utilities/DatabaseUtilities.java	2010-01-07 20:06:17 UTC (rev 1014)
+++ trunk/core/org.cishell.utilities/src/org/cishell/utilities/DatabaseUtilities.java	2010-01-07 20:18:16 UTC (rev 1015)
@@ -15,13 +15,13 @@
 		}
 	}
 
-	public static Connection connect(Database database)
+	public static Connection connect(Database database, String messageIfError)
 	throws AlgorithmExecutionException {
 		Connection connection;
 		try {
 			connection = database.getConnection();
 		} catch (SQLException e) {
-			throw new AlgorithmExecutionException("Unable to communicate with the database.", e);
+			throw new AlgorithmExecutionException(messageIfError, e);
 		}
 		return connection;
 	}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 |