Changeset 9264


Ignore:
Timestamp:
2005-03-03T16:16:49+13:00 (19 years ago)
Author:
kjdon
Message:

now looks for an error element after the query

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/action/QueryAction.java

    r9140 r9264  
    117117        Element mr_query_response = (Element)this.mr.process(mr_query_message);
    118118
    119     String path = GSPath.appendLink(GSXML.RESPONSE_ELEM, GSXML.METADATA_ELEM+GSXML.LIST_MODIFIER);
     119    //. check for errors
     120    String path = GSPath.appendLink(GSXML.RESPONSE_ELEM, GSXML.ERROR_ELEM);
     121    Element error_elem = (Element) GSXML.getNodeByPath(mr_query_response, path);
     122    if (error_elem != null) {
     123        // should we continue?? perhaps have a kind of error - information vs fatal??
     124        System.err.println("found an error elem");
     125        page_response.appendChild(this.doc.importNode(error_elem, true));
     126        return page_response;
     127    }
     128    path = GSPath.appendLink(GSXML.RESPONSE_ELEM, GSXML.METADATA_ELEM+GSXML.LIST_MODIFIER);
    120129    Element query_result_metadata_list = (Element) GSXML.getNodeByPath(mr_query_response, path);
    121130    if (query_result_metadata_list == null) {
Note: See TracChangeset for help on using the changeset viewer.