You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by vl...@apache.org on 2002/11/19 06:21:26 UTC

cvs commit: xml-xindice/java/src/org/apache/xindice/client/xmldb/xmlrpc CollectionImpl.java

vladimir    2002/11/18 21:21:26

  Modified:    java/src/org/apache/xindice/client/xmldb/xmlrpc
                        CollectionImpl.java
  Log:
  Use new chained exception from XMLDBException
  
  Revision  Changes    Path
  1.15      +14 -14    xml-xindice/java/src/org/apache/xindice/client/xmldb/xmlrpc/CollectionImpl.java
  
  Index: CollectionImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xindice/java/src/org/apache/xindice/client/xmldb/xmlrpc/CollectionImpl.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- CollectionImpl.java	31 Oct 2002 06:58:48 -0000	1.14
  +++ CollectionImpl.java	19 Nov 2002 05:21:26 -0000	1.15
  @@ -127,7 +127,7 @@
               XmlRpc.setDriver("xerces");
           } catch (Exception e) {
               
  -            throw new XMLDBException(ErrorCodes.VENDOR_ERROR, "Xerces needed");
  +            throw new XMLDBException(ErrorCodes.VENDOR_ERROR, "Xerces needed", e);
           }
        
           try {
  @@ -141,12 +141,12 @@
           } catch (MalformedURLException e) {
               
   			client = null;
  -            throw new XMLDBException(ErrorCodes.INVALID_URI);
  +            throw new XMLDBException(ErrorCodes.INVALID_URI, e);
           } catch (Exception e) {
   
   			client = null;
               throw new XMLDBException(ErrorCodes.NO_SUCH_COLLECTION,
  -                                     "Collection not found: " + collPath);
  +                                     "Collection not found: " + collPath, e);
           }
       }
   
  @@ -223,7 +223,7 @@
                       "GetDocumentCount", params)).intValue();
           } catch (Exception e) {
               
  -            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e.getMessage());
  +            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e);
           }
       }
       
  @@ -260,7 +260,7 @@
               
           } catch (Exception e) {
               
  -            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e.getMessage());
  +            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e);
           }
       }
       
  @@ -329,7 +329,7 @@
               return (String) runRemoteCommand("CreateNewOID", params);
           } catch (Exception e) {
               
  -            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e.getMessage());
  +            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e);
           }
       }
       
  @@ -404,7 +404,7 @@
             params.put(RPCDefaultMessage.NAME, resource.getId());
             runRemoteCommand("RemoveDocument", params);
          } catch (Exception e) {
  -          throw new XMLDBException(ErrorCodes.NO_SUCH_RESOURCE, e.getMessage());
  +          throw new XMLDBException(ErrorCodes.NO_SUCH_RESOURCE, e);
          }
       }
       
  @@ -426,7 +426,7 @@
               return (String[]) list.toArray(new String[list.size()]);
           } catch (Exception e) {
               
  -            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e.getMessage());
  +            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e);
           }   
       }
       
  @@ -447,7 +447,7 @@
               return result.intValue();
               
           } catch (Exception e) {
  -            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e.getMessage());
  +            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e);
           }   
       }
       
  @@ -469,7 +469,7 @@
               return (String[]) list.toArray(new String[list.size()]);
           } catch (Exception e) {
               
  -            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e.getMessage());
  +            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e);
           }   
       }  
   
  @@ -551,7 +551,7 @@
           } catch (Exception e) {
               
               throw new XMLDBException(ErrorCodes.INVALID_COLLECTION,
  -                    "Cannot create child collection: " + e.getMessage());
  +                    "Cannot create child collection", e);
           }
       }
   
  @@ -570,7 +570,7 @@
           }
           catch (Exception e) {         
              throw new XMLDBException(ErrorCodes.INVALID_COLLECTION,
  -                    "Cannot create child collection: " + e.getMessage());
  +                    "Cannot create child collection", e);
           }
        }
        
  @@ -593,7 +593,7 @@
           } catch (Exception e) {
               
               throw new XMLDBException(ErrorCodes.INVALID_COLLECTION,
  -                    "Cannot remove child collection: " + e.getMessage());
  +                    "Cannot remove child collection", e);
           }
       }