henning 2003/07/28 02:11:36
Modified: src/generator/src/java/org/apache/torque/task
TorqueDataSQLTask.java
Log:
The parser might throw SAX errors up to the task. Catch it and report it as
a build error. This converts
BUILD FAILED
Generation failed. For more information consult the velocity log, or invoke ant with
the -debug flag.
to
BUILD FAILED
org.xml.sax.SAXException: Table Foo unknown.
which helps a little more finding errors in your torque sql data.
Revision Changes Path
1.5 +7 -1
db-torque/src/generator/src/java/org/apache/torque/task/TorqueDataSQLTask.java
Index: TorqueDataSQLTask.java
===================================================================
RCS file:
/home/cvs/db-torque/src/generator/src/java/org/apache/torque/task/TorqueDataSQLTask.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- TorqueDataSQLTask.java 25 Jul 2003 16:47:42 -0000 1.4
+++ TorqueDataSQLTask.java 28 Jul 2003 09:11:36 -0000 1.5
@@ -69,6 +69,8 @@
import org.apache.velocity.context.Context;
+import org.xml.sax.SAXException;
+
import org.apache.torque.engine.EngineException;
import org.apache.torque.engine.database.model.AppData;
import org.apache.torque.engine.database.model.Database;
@@ -231,6 +233,10 @@
catch (EngineException ee)
{
throw new BuildException(ee);
+ }
+ catch (SAXException se)
+ {
+ throw new BuildException(se);
}
return context;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]