diff -ru JUnitDoclet.orig/build.xml JUnitDoclet/build.xml
--- JUnitDoclet.orig/build.xml	Sat Nov 23 00:00:00 2002
+++ JUnitDoclet/build.xml	Sat Apr  5 18:53:52 2003
@@ -97,12 +97,12 @@
     dist         - build distribution
   -->
   <target name="clean">
-    <delete dir="${build.classes}" />
+    <!-- <delete dir="${build.classes}" /> -->
     <delete dir="${build.javadoc}" />
     <delete dir="${build}/${projecttitle}.${projectversion}" />
-    <delete >
+   <!-- <delete >
         <fileset dir="." includes="${build}/**/*" />
-    </delete>
+    </delete> -->
   </target>
 
   <target name="prepare" depends="clean">
diff -ru JUnitDoclet.orig/res/junitdoclet.properties JUnitDoclet/res/junitdoclet.properties
--- JUnitDoclet.orig/res/junitdoclet.properties	Sun Oct 27 00:00:00 2002
+++ JUnitDoclet/res/junitdoclet.properties	Sat Apr  5 20:48:58 2003
@@ -156,10 +156,37 @@
 ####
 template.testmethod.default.010=  public void ${testmethod.name}() throws Exception {
 template.testmethod.default.020=    ${marker.method.begin} ${method.name}
+template.testmethod.default.021=    ${testmethod.exception_normal}
+template.testmethod.default.022=    ${testmethod.exception_throws}
 template.testmethod.default.030=    ${marker.method.end} ${method.name}
 template.testmethod.default.040=  }
 template.testmethod.default.050=
 
+####
+# template for test methods with exceptions
+# by Nicola Fankhauser (nicola.fankhauser@variant.ch)
+####
+template.testmethod.exception_normal.020= 
+template.testmethod.exception_normal.030= 	// insert code testing basic functionality
+template.testmethod.exception_normal.040= 	try {
+template.testmethod.exception_normal.050= 		${testcase.instance.name}.${method.name}(null);
+template.testmethod.exception_normal.060= 	
+template.testmethod.exception_normal.070= 	} catch (Throwable e) {
+template.testmethod.exception_normal.080= 		fail("Failed with:" + e);
+template.testmethod.exception_normal.090= 	}
+
+template.testmethod.exception_throws.120= 	// insert code triggering ${testmethod.exception.name} 
+template.testmethod.exception_throws.130= 	try {	
+template.testmethod.exception_throws.140= 		${testcase.instance.name}.${method.name}(null);
+template.testmethod.exception_throws.150= 		
+template.testmethod.exception_throws.160= 		fail("Should raise ${testmethod.exception.name}");
+template.testmethod.exception_throws.170= 	}
+template.testmethod.exception_throws.180= 	catch (${testmethod.exception.name} e) {
+template.testmethod.exception_throws.190= 	}
+template.testmethod.exception_throws.200= 	catch (Throwable e) {
+template.testmethod.exception_throws.210= 		fail("Failed with:" + e);
+template.testmethod.exception_throws.220= 	}
+
 
 ####
 # template for combined accessor test methods ("testSetGetValue", "testSetIsFlag")
@@ -172,7 +199,11 @@
 template.testmethod.accessor.060=      ${testcase.instance.name}.${accessor.set.name}(tests[i]);
 template.testmethod.accessor.070=      assertEquals(tests[i], ${testcase.instance.name}.${accessor.get.name}());
 template.testmethod.accessor.080=    }
-template.testmethod.accessor.090=    ${marker.method.end} ${accessor.set.name} ${accessor.get.name}
+template.testmethod.accessor.081=
+template.testmethod.accessor.095=    ${testmethod.exception_normal}
+template.testmethod.accessor.096=    ${testmethod.exception_throws}
+template.testmethod.accessor.097=    
+template.testmethod.accessor.098=    ${marker.method.end} ${accessor.set.name} ${accessor.get.name}
 template.testmethod.accessor.100=  }
 template.testmethod.accessor.110=
 
diff -ru JUnitDoclet.orig/src/com/objectfab/tools/junitdoclet/DefaultTestingStrategy.java JUnitDoclet/src/com/objectfab/tools/junitdoclet/DefaultTestingStrategy.java
--- JUnitDoclet.orig/src/com/objectfab/tools/junitdoclet/DefaultTestingStrategy.java	Thu Nov 21 00:00:00 2002
+++ JUnitDoclet/src/com/objectfab/tools/junitdoclet/DefaultTestingStrategy.java	Sat Apr  5 20:43:59 2003
@@ -29,8 +29,10 @@
 import com.sun.javadoc.MethodDoc;
 import com.sun.javadoc.Parameter;
 
+import java.util.Enumeration;
 import java.util.Properties;
 import java.util.LinkedList;
+import java.util.Vector;
 
 public class DefaultTestingStrategy extends DefaultConfigurableStrategy implements TestingStrategy, JUnitDocletProperties {
 
@@ -190,6 +192,24 @@
         return returnValue;
     }
 
+	/**
+	 * Returns a vector of all found exceptions being thrown by the given
+	 * <code>methodDocs</code>
+	 * @author <a href="mailto:nicola.fankhauser@variant.ch">Nicola Fankhauser</a>
+	 * @param methodDocs
+	 * @param index
+	 * @return
+	 */
+	private Vector getExceptions(MethodDoc[] methodDocs, int index) {
+		ClassDoc[] exceptions = methodDocs[index].thrownExceptions();
+		Vector vector = new Vector();
+		for(int i=0;i<exceptions.length;i++){
+			ClassDoc exception = exceptions[i];
+			vector.add(exception.name());
+		}
+		return vector;
+	}
+
     public Properties getTestSuiteProperties(PackageDoc[] packageDocs, int indexPackage, NamingStrategy naming,
                                              Properties properties) {
 
@@ -248,7 +268,8 @@
     /**
      * Comment on DBC:<br>
      * \@pre (methodDoc != null) && (classDoc != null) && (packageDoc != null) && (naming != null) && (properties != null) <br>
-     *
+     * 
+     * @author ObjectFab, exception handling by <a href="mailto:nicola.fankhauser@variant.ch">Nicola Fankhauser</a>
      * @return if the method specified by 'index' needs a test, new Properties instance with all properties for parameter 'properties'
      *           and test method specific properties;
      *           null if the method specified by 'index' needs no test
@@ -269,6 +290,16 @@
                 returnValue.setProperty(TESTMETHOD_NAME, naming.getTestMethodName(methodDocs[index].name()));
                 returnValue.setProperty(TEMPLATE_NAME, TEMPLATE_ATTRIBUTE_DEFAULT);
                 returnValue.setProperty(METHOD_NAME, methodDocs[index].name());
+                
+				if(getExceptions(methodDocs,index).size() > 0){
+					returnValue.setProperty(TESTMETHOD_EXCEPTION_THROWS, getTestExceptionProperties(methodDocs, index, returnValue));
+					returnValue.setProperty(TESTMETHOD_EXCEPTION_NORMAL, StringHelper.replaceVariables(getTemplate(returnValue, "testmethod", "exception_normal"),returnValue));
+				}
+				else {
+					returnValue.setProperty(TESTMETHOD_EXCEPTION_THROWS, "");
+					returnValue.setProperty(TESTMETHOD_EXCEPTION_NORMAL, "");
+				}
+				
                 signature = new StringBuffer("");
                 for (int i=0; i<getNumberOfParameters(methodDocs[index]); i++) {
                     parameters = methodDocs[index].parameters();
@@ -286,6 +317,18 @@
         return returnValue;
     }
 
+	private String getTestExceptionProperties(MethodDoc[] methodDocs, int index, Properties returnValue) {
+		String exceptionTemplate = new String();
+			String exceptionEmptyTemplate = getTemplate(returnValue, "testmethod", "exception_throws");
+		
+			Enumeration e = getExceptions(methodDocs, index).elements();
+			while(e.hasMoreElements()){
+				returnValue.setProperty(TESTMETHOD_EXCEPTION_NAME, (String) e.nextElement());
+				exceptionTemplate = exceptionTemplate +"\n"+ StringHelper.replaceVariables(exceptionEmptyTemplate, returnValue);
+			}
+		return exceptionTemplate;
+	}
+
     public String getTestSuiteAddTestSuites(PackageDoc[] packageDocs, int indexPackage, NamingStrategy naming, Properties properties) {
         StringBuffer sb;
         String template;
@@ -382,7 +425,8 @@
 
     /**
      * Builds accessor specific properties if the method specified by 'index' is an accessor method.
-     *
+     * 
+     * @author ObjectFab, exception treatment by <a href="mailto:nicola.fankhauser@variant.ch">Nicola Fankhauser</a>
      * @return if specfied method is an set accessor, returns properties with all properties from
      *         parameter 'properties' and accessor specific properties;
      *         if specfied method is an get accessor, return null;
@@ -439,6 +483,16 @@
                         returnValue.setProperty(TESTMETHOD_NAME, testMethodName);
                         returnValue.setProperty(TEMPLATE_NAME, TEMPLATE_ATTRIBUTE_ACCESSOR);
                         returnValue.setProperty(METHOD_NAME, methodDocs[index].name());
+                        
+                        if(getExceptions(methodDocs,index).size() > 0){
+							returnValue.setProperty(TESTMETHOD_EXCEPTION_THROWS, getTestExceptionProperties(methodDocs, index, returnValue));
+							returnValue.setProperty(TESTMETHOD_EXCEPTION_NORMAL, StringHelper.replaceVariables(getTemplate(returnValue, "testmethod", "exception_normal"),returnValue));
+                        }				
+                        else {
+							returnValue.setProperty(TESTMETHOD_EXCEPTION_THROWS, "");
+							returnValue.setProperty(TESTMETHOD_EXCEPTION_NORMAL, "");
+						}
+						
                     }
                 } else {
                     // method is not an accessor
diff -ru JUnitDoclet.orig/src/com/objectfab/tools/junitdoclet/JUnitDocletProperties.java JUnitDoclet/src/com/objectfab/tools/junitdoclet/JUnitDocletProperties.java
--- JUnitDoclet.orig/src/com/objectfab/tools/junitdoclet/JUnitDocletProperties.java	Mon Oct 28 00:00:00 2002
+++ JUnitDoclet/src/com/objectfab/tools/junitdoclet/JUnitDocletProperties.java	Sat Apr  5 19:28:07 2003
@@ -79,6 +79,13 @@
 
     //
     public final static String TESTMETHOD_NAME                 = "testmethod.name";
+    
+    /**
+     * exception handling by <a href="mailto:nicola.fankhauser@variant.ch">Nicola Fankhauser</a>
+     */ 
+    public final static String TESTMETHOD_EXCEPTION_NAME       = "testmethod.exception.name";
+	public final static String TESTMETHOD_EXCEPTION_NORMAL		= "testmethod.exception_normal";
+	public final static String TESTMETHOD_EXCEPTION_THROWS		= "testmethod.exception_throws";
 
     // variables holding informations about the device under test. (usefull in javadoc)
     public final static String PACKAGE_NAME                    = "package.name";
