db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r389308 - /db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/SQLToAppData.java
Date Mon, 27 Mar 2006 22:17:00 GMT
Author: tfischer
Date: Mon Mar 27 14:16:58 2006
New Revision: 389308

URL: http://svn.apache.org/viewcvs?rev=389308&view=rev
Log:
Fixed a situation where an endless loop may occur. Now, an exception is thrown instead of
the endless loop.

Modified:
    db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/SQLToAppData.java

Modified: db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/SQLToAppData.java
URL: http://svn.apache.org/viewcvs/db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/SQLToAppData.java?rev=389308&r1=389307&r2=389308&view=diff
==============================================================================
--- db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/SQLToAppData.java
(original)
+++ db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/SQLToAppData.java
Mon Mar 27 14:16:58 2006
@@ -20,7 +20,9 @@
 import java.io.FileReader;
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
+
 import org.apache.torque.engine.database.model.Column;
 import org.apache.torque.engine.database.model.Database;
 import org.apache.torque.engine.database.model.ForeignKey;
@@ -512,6 +514,24 @@
                     {
                         next();
                     }
+                }
+                else
+                {
+                    StringBuffer line = new StringBuffer();
+                    for (Iterator tokenIt = tokens.iterator(); 
+                       tokenIt.hasNext();)
+                    {
+                        line.append(tokenIt.next());
+                        if (tokenIt.hasNext())
+                        {
+                            line.append(" ");
+                        }
+                    }
+                    throw new ParseException("Error parsing line "
+                            + line + " : Unknown token Nr. "
+                            + count
+                            + " : "
+                            + token);
                 }
             }
             next(); // eat the ,



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message