Ignore:
Timestamp:
2005-05-04T16:15:31+12:00 (19 years ago)
Author:
kjdon
Message:

some methods from documentretrieve classes now throw GSExceptions. am trying to make it so that no Exceptions get to the user interface. returning a lot more error elements too, in the hope that they may be useful for other people

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ant-install-branch/gsdl3/src/java/org/greenstone/gsdl3/service/GS3MGRetrieve.java

    r9001 r9815  
    2121// Greenstone classes
    2222import org.greenstone.mg.*;
     23import org.greenstone.gsdl3.core.GSException;
    2324import org.greenstone.gsdl3.util.GSFile;
    2425import org.greenstone.gsdl3.util.GSXML;
     
    8687     * <nodeContent>text content or other elements</nodeContent>
    8788     */
    88     protected Element getNodeContent(String doc_id) {
     89    protected Element getNodeContent(String doc_id) throws GSException {
    8990
    9091    if (GS3OID.isDocTop(doc_id) && database.isHierarchicalDocument(doc_id)) {
     
    111112    } catch (Exception e) {
    112113        System.out.println("exception happended with mg_src.getDocument()");
    113         doc_content = "this is the content for section hash id "+ doc_id+", mg doc num "+doc_int+"\n";
     114        throw new GSException("Couldn't get document content for id: "+ doc_int+"\n"+e.getMessage());
     115        //doc_content = "this is the content for section hash id "+ doc_id+", mg doc num "+doc_int+"\n";
    114116    }
    115117   
Note: See TracChangeset for help on using the changeset viewer.