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:20:37 UTC

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

vladimir    2002/11/18 21:20:37

  Modified:    java/src/org/apache/xindice/client/xmldb/embed
                        CollectionImpl.java
  Log:
  Use new chained exception from XMLDBException
  
  Revision  Changes    Path
  1.9       +12 -12    xml-xindice/java/src/org/apache/xindice/client/xmldb/embed/CollectionImpl.java
  
  Index: CollectionImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xindice/java/src/org/apache/xindice/client/xmldb/embed/CollectionImpl.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- CollectionImpl.java	31 Oct 2002 06:58:48 -0000	1.8
  +++ CollectionImpl.java	19 Nov 2002 05:20:36 -0000	1.9
  @@ -110,7 +110,7 @@
              this.col = db.getCollection(collPath);
           } catch (Exception e) {
               throw new XMLDBException(ErrorCodes.NO_SUCH_COLLECTION,
  -                                     "Collection not found: " + collPath);
  +                                     "Collection not found: " + collPath, e);
           }
   		if(this.col == null) {
               throw new XMLDBException(ErrorCodes.NO_SUCH_COLLECTION,
  @@ -152,7 +152,7 @@
           try {            
               return (int) col.getDocumentCount();
           } catch (Exception e) {            
  -            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e.getMessage());
  +            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e);
           }
       }
       
  @@ -195,7 +195,7 @@
                                         "A resource must be a document in order to be stored.");
             }
          } catch (Exception e) {
  -          throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e.getMessage());
  +          throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e);
          }
       }
       
  @@ -257,7 +257,7 @@
           try {            
               return col.createNewOID().toString();
           } catch (Exception e) {            
  -            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e.getMessage());
  +            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e);
           }
       }
       
  @@ -327,7 +327,7 @@
          try {
             col.remove(resource.getId());
          } catch (Exception e) {
  -          throw new XMLDBException(ErrorCodes.NO_SUCH_RESOURCE, e.getMessage());
  +          throw new XMLDBException(ErrorCodes.NO_SUCH_RESOURCE, e);
          }
       }
       
  @@ -343,7 +343,7 @@
           try {            
               return col.listCollections();
           } catch (Exception e) {            
  -            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e.getMessage());
  +            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e);
           }   
       }
       
  @@ -359,7 +359,7 @@
           try {            
               return (int) col.countCollections();            
           } catch (Exception e) {
  -            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e.getMessage());
  +            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e);
           }   
       }
       
  @@ -375,7 +375,7 @@
           try {
               return col.listDocuments();
           } catch (Exception e) {            
  -            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e.getMessage());
  +            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e);
           }   
       }  
   
  @@ -460,7 +460,7 @@
              return createCollection(name, doc);
           } catch (Exception e) {            
               throw new XMLDBException(ErrorCodes.INVALID_COLLECTION,
  -                    "Cannot create child collection: " + e.getMessage());
  +                    "Cannot create child collection", e);
           }
       }
   
  @@ -477,7 +477,7 @@
           }
           catch (Exception e) {         
              throw new XMLDBException(ErrorCodes.INVALID_COLLECTION,
  -                    "Cannot create child collection: " + e.getMessage());
  +                    "Cannot create child collection", e);
           }
        }
        
  @@ -494,7 +494,7 @@
               col.dropCollection( col.getCollection( childName ) );
           } catch (Exception e) {
               throw new XMLDBException(ErrorCodes.INVALID_COLLECTION,
  -                    "Cannot remove child collection: " + e.getMessage());
  +                    "Cannot remove child collection", e);
           }
       }