latest quantum sources 2.3.2
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.quantum.sql / src / com / quantum / model / xml / TorqueConverter.java
index 15c3c57..928a1f0 100644 (file)
@@ -8,6 +8,7 @@ import java.sql.Types;
 import com.quantum.model.Bookmark;
 import com.quantum.model.Column;
 import com.quantum.model.Entity;
+import com.quantum.model.NotConnectedException;
 import com.quantum.model.Schema;
 
 import org.w3c.dom.Document;
@@ -39,12 +40,16 @@ public class TorqueConverter {
         Element table = root.getOwnerDocument().createElement("table");
         table.setAttribute("name", entity.getName());
         
-        Column[] columns = entity.getColumns();
-        for (int i = 0, length = (columns == null) ? 0 : columns.length;
-            i < length;
-            i++) {
-            convert(table, columns[i]);
-        }
+               try {
+                       Column[] columns = entity.getColumns();
+                       for (int i = 0, length = (columns == null) ? 0 : columns.length;
+                   i < length;
+                   i++) {
+                   convert(table, columns[i]);
+               }
+               } catch (NotConnectedException e) {
+               } catch (SQLException e) {
+               }
         
         root.appendChild(table);
     }