Commit 769fd2bc authored by Fabien Triolet's avatar Fabien Triolet
Browse files

Added a try catch in the transform method

parent 7a069951
/*
* $Id: Transformer.java,v 1.4 2003-01-30 15:47:46 triolet Exp $
* $Id: Transformer.java,v 1.5 2003-03-06 07:40:00 triolet Exp $
*
* Transmorpher
*
......@@ -161,6 +161,8 @@ public class Transformer extends MainProcess {
*@exception IOException When IO errors occur
*/
public final void generateBody(Writer file, LinearIndexedStruct externs) throws IOException {
file.writeln(4, "try{");
Parameters param = getParameters();
file.writeln(4, "Parameters p = new Parameters();");
for (Enumeration e = param.getNames(); e.hasMoreElements(); ) {
......@@ -173,9 +175,7 @@ public class Transformer extends MainProcess {
}
// JE: warning, reuse of parameters
file.writeln(4, "tmCurrentCompositeProcess.bindParameters(p);");
file.writeln(4, "try{");
file.writeln(6, "tmCurrentCompositeProcess.execProcess(false);");
file.writeln(4, "}catch(Exception e){}");
}//end proc
/**
......@@ -188,6 +188,8 @@ public class Transformer extends MainProcess {
file.writeln(4, "if (debug_mode>0) {");
file.writeln(6, "end = System.currentTimeMillis();");
file.writeln(6, "System.err.println(\">> End of execution (\"+(end-begin)+\")\");}");
file.writeln(4, "}catch(Exception e){}");
file.writeln(2, "} //end main");
generateTransformerMethod(file);
file.writeln("} //end class");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment