bug 1469012, exception in CompletionProposal
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.quantum.sql / src / com / quantum / sql / SQLMetaDataResults.java
index 3835511..4f7d988 100644 (file)
@@ -57,13 +57,19 @@ public class SQLMetaDataResults extends SQLResultSetResults {
                        Vector row = new Vector();
                        row.addElement(metaData.getColumnName(i));
                        row.addElement(metaData.getColumnTypeName(i));
-                       int precision = metaData.getPrecision(i);
+                       long precision = 0;
+                       try {
+                               precision = metaData.getPrecision(i);
+            } catch (Throwable t) {
+               // Do nothing. An exception can be generated by some very large row sizes, like BLOB in Oracle.
+               // Then getPrecision() will generate an exception. So we ignore it and go on.
+            }
                        if (precision == 0) {
                                precision = metaData.getColumnDisplaySize(i);
                        }
                        int scale = metaData.getScale(i);
                        
-                       row.addElement(new Integer(precision));
+                       row.addElement(new Long(precision));
                        row.addElement(new Integer(scale));
                        
                        int nullable = metaData.isNullable(i);