geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: rev 53814 - geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment
Date Tue, 05 Oct 2004 17:57:49 GMT
Author: dain
Date: Tue Oct  5 10:57:48 2004
New Revision: 53814

Modified:
   geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
Log:
Added better error handling 


Modified: geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
==============================================================================
--- geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
(original)
+++ geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
Tue Oct  5 10:57:48 2004
@@ -103,8 +103,20 @@
             throw new DeploymentException("No plan or module specified");
         }
 
+        if (planFile != null) {
+            if (!planFile.exists()) {
+                throw new DeploymentException("Plan file does not exist: " + planFile.getAbsolutePath());
+            }
+            if (!planFile.isFile()) {
+                throw new DeploymentException("Plan file is not a regular file: " + planFile.getAbsolutePath());
+            }
+        }
+
         JarFile module = null;
         if (moduleFile != null) {
+            if (!moduleFile.exists()) {
+                throw new DeploymentException("Module file does not exist: " + moduleFile.getAbsolutePath());
+            }
             try {
                 module = DeploymentUtil.createJarFile(moduleFile);
             } catch (IOException e) {
@@ -125,7 +137,9 @@
                 }
             }
             if (builder == null) {
-                throw new DeploymentException("No deployer found for this plan type: " +
planFile);
+                throw new DeploymentException("No deployer found:" +
+                        (planFile == null ? "" : " planFile=" + planFile.getAbsolutePath())
+
+                        (moduleFile == null ? "" : ", moduleFile" + moduleFile.getAbsolutePath()));
             }
 
             // create a configuration dir to write the configuration during the building
proces

Mime
View raw message