src/java/m/weps/V1_3.java
@@ -169,6 +169,7 @@ |
|
// Our WEPS model call uses the following cmd line args |
// /weps -W1 -u0 -I2 -t1 -P./ >stdout.txt 2>stderr.txt |
+ LOG.info("starting process"); |
pc = new ProcessComponent(); |
|
// linux based WEPS |
@@ -322,11 +323,16 @@ |
String error = translator.Translate(); |
if(error != null) |
{ |
+ try{ |
if (Integer.parseInt(error) != 1) |
{ |
LOG.log(Level.SEVERE, "THERE IS AN ERROR CODE RETURNED FROM THE MAN2WEPS TRANSLATOR. Code=" + error); |
throw new ServiceException(error); |
} |
+ }catch(NumberFormatException ex){ // I want to transition the numeric errors to string errors like this |
+ LOG.log(Level.SEVERE, "THERE IS AN ERROR: " + error); |
+ throw new ServiceException(error); |
+ } |
} |
} catch (Exception e) { |
LOG.log(Level.SEVERE, "FLAT UP EXPLOSION FROM THE WEPS TRANSLATOR:" + e.toString()); |
src/java/m/weps/WepsRunFileGenerator.java
@@ -30,6 +30,7 @@ |
* @param args the command line arguments |
*/ |
public static void GenerateWepsRunFile(WepsModelRun wmr, String outputDir, String outputFilename) { |
+ log.info("Generating Weps Run File"); |
vt = new WepsRunFileGenerator(); |
Properties prop = new Properties(); |
if (wmr == null) |
@@ -39,6 +40,7 @@ |
if (outputFilename == null) |
outputFilename = "weps.run"; |
|
+ log.info("setting properties"); |
VelocityEngine ve = new VelocityEngine(); |
ve.setProperty( RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS,"org.apache.velocity.runtime.log.Log4JLogChute" ); |
ve.setProperty("runtime.log.logsystem.log4j.logger",log.getName()); |
@@ -47,6 +49,7 @@ |
ve.init(); |
VelocityContext vc = new VelocityContext(); |
vc.put("wmr", wmr); |
+ log.info("Fetching weps template"); |
try |
{ |
// Fetch weps file template from classpath base dir |