Project

General

Profile

« Previous | Next » 

Revision 3024

Added by sgarg almost 18 years ago

added exception handler for normalize function. if StringIndexOutOfBoundsException is thrown then it is reported and nodedata value is forwarded without normalization.

View differences:

src/edu/ucsb/nceas/metacat/DocumentImpl.java
172 172
        } catch (McdbException ex) {
173 173
            throw ex;
174 174
        } catch (Throwable t) {
175
            throw new McdbException("Error reading document: " + docid);
175
        	throw new McdbException("Error reading document: " + docid);
176 176
        }
177 177
    }
178 178

  
......
1883 1883
                nodename = rs.getString(5);
1884 1884
                nodeprefix = rs.getString(6);
1885 1885
                nodedata = rs.getString(7);
1886
                nodedata = MetaCatUtil.normalize(nodedata);
1886
                try
1887
                {
1888
                	nodedata = MetaCatUtil.normalize(nodedata);
1889
                } catch (java.lang.StringIndexOutOfBoundsException SIO){
1890
                	logMetacat.warn("StringIndexOutOfBoundsException in normalize() while reading the document");
1891
                }
1887 1892
                nodedatanumerical = rs.getFloat(8);
1888 1893
                
1889 1894
                // add the data to the node record list hashtable

Also available in: Unified diff