Project

General

Profile

« Previous | Next » 

Revision 1609

Added by Jing Tao about 21 years ago

Fixed a bug to checking error.

View differences:

src/edu/ucsb/nceas/metacat/ReplicationHandler.java
175 175
        
176 176
        MetaCatUtil.debugMessage("docid: "+server+" "+result, 50);
177 177
        //check if result have error or not, if has skip it.
178
        if (result.indexOf("error")!=-1)
178
        if (result.indexOf("<error>")!=-1 && result.indexOf("</error>")!=-1)
179 179
        {
180 180
          MetacatReplication.replErrorLog("Failed to get updated doc list "+
181 181
                          "for server " + server + " because "+result);
......
378 378
      // Get docid content
379 379
      String newxmldoc = MetacatReplication.getURLContent(u);
380 380
      // If couldn't get skip it
381
      if ( newxmldoc.indexOf("error")!= -1)
381
      if ( newxmldoc.indexOf("<error>")!= -1 && newxmldoc.indexOf("</error>")!=-1)
382 382
      {
383 383
         throw new Exception(newxmldoc);
384 384
      }

Also available in: Unified diff