cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/acting AbstractDatabaseAction.java DatabaseAddAction.java DatabaseUpdateAction.java
Date Mon, 26 Feb 2001 22:22:12 GMT
bloritsch    01/02/26 14:22:12

  Modified:    src/org/apache/cocoon/acting Tag: xml-cocoon2
                        AbstractDatabaseAction.java DatabaseAddAction.java
                        DatabaseUpdateAction.java
  Log:
  Add some exceptions to narrow down where problems are.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.3   +8 -3      xml-cocoon/src/org/apache/cocoon/acting/Attic/AbstractDatabaseAction.java
  
  Index: AbstractDatabaseAction.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/acting/Attic/AbstractDatabaseAction.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- AbstractDatabaseAction.java	2001/02/26 21:46:45	1.1.2.2
  +++ AbstractDatabaseAction.java	2001/02/26 22:22:07	1.1.2.3
  @@ -139,7 +139,7 @@
    * </table>
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.2.2 $ $Date: 2001/02/26 21:46:45 $
  + * @version CVS $Revision: 1.1.2.3 $ $Date: 2001/02/26 22:22:07 $
    */
   public abstract class AbstractDatabaseAction extends ComposerAction implements Configurable
{
       private static Map configurations = new HashMap();
  @@ -177,16 +177,21 @@
       protected Configuration getConfiguration(String descriptor) throws ConfigurationException
{
           Configuration conf = null;
   
  +        if (descriptor == null) {
  +            throw new ConfigurationException("The form descriptor is not set!");
  +        }
  +
           synchronized (AbstractDatabaseAction.configurations) {
               conf = (Configuration) AbstractDatabaseAction.configurations.get(descriptor);
   
               if (conf == null) {
                   URLFactory urlFactory = null;
                   Parser parser = null;
  +                URL resource = null;
   
                   try {
                       urlFactory = (URLFactory) this.manager.lookup(Roles.URL_FACTORY);
  -                    URL resource = urlFactory.getURL(descriptor);
  +                    resource = urlFactory.getURL(descriptor);
   
                       parser = (Parser)this.manager.lookup(Roles.PARSER);
                       SAXConfigurationHandler builder = new SAXConfigurationHandler();
  @@ -199,7 +204,7 @@
                       conf = builder.getConfiguration();
                   } catch (Exception e) {
                       getLogger().error("Could not configure Database mapping environment",
e);
  -                    throw new ConfigurationException("Error trying to load configurations");
  +                    throw new ConfigurationException("Error trying to load configurations
for resource: " + resource.toExternalForm());
                   } finally {
                       if (urlFactory != null) this.manager.release((Component) urlFactory);
                       if (parser != null) this.manager.release((Component) parser);
  
  
  
  1.1.2.3   +2 -2      xml-cocoon/src/org/apache/cocoon/acting/Attic/DatabaseAddAction.java
  
  Index: DatabaseAddAction.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/acting/Attic/DatabaseAddAction.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- DatabaseAddAction.java	2001/02/26 21:25:13	1.1.2.2
  +++ DatabaseAddAction.java	2001/02/26 22:22:08	1.1.2.3
  @@ -40,7 +40,7 @@
    * only one table at a time to update.
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.2.2 $ $Date: 2001/02/26 21:25:13 $
  + * @version CVS $Revision: 1.1.2.3 $ $Date: 2001/02/26 22:22:08 $
    */
   public class DatabaseAddAction extends AbstractDatabaseAction {
       private static final Map addStatements = new HashMap();
  @@ -76,7 +76,7 @@
   
               statement.execute();
           } catch (Exception e) {
  -            throw new ProcessingException("Could not delete record", e);
  +            throw new ProcessingException("Could not add record", e);
           } finally {
               if (conn != null) {
                   try {
  
  
  
  1.1.2.5   +2 -2      xml-cocoon/src/org/apache/cocoon/acting/Attic/DatabaseUpdateAction.java
  
  Index: DatabaseUpdateAction.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/acting/Attic/DatabaseUpdateAction.java,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- DatabaseUpdateAction.java	2001/02/26 21:16:39	1.1.2.4
  +++ DatabaseUpdateAction.java	2001/02/26 22:22:08	1.1.2.5
  @@ -40,7 +40,7 @@
    * only one table at a time to update.
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.2.4 $ $Date: 2001/02/26 21:16:39 $
  + * @version CVS $Revision: 1.1.2.5 $ $Date: 2001/02/26 22:22:08 $
    */
   public class DatabaseUpdateAction extends AbstractDatabaseAction {
       private static final Map updateStatements = new HashMap();
  @@ -84,7 +84,7 @@
   
               statement.execute();
           } catch (Exception e) {
  -            throw new ProcessingException("Could not delete record", e);
  +            throw new ProcessingException("Could not updaterecord", e);
           } finally {
               if (conn != null) {
                   try {
  
  
  

Mime
View raw message