You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by da...@apache.org on 2004/10/05 19:57:49 UTC
svn commit: rev 53814 - geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment
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