<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -5737,6 +5737,7 @@ public static class NewInstanceMethod extends ObjMethod{
 	Type[] argTypes;
 	Type retType;
 	Class retClass;
+	Class[] exclasses;
 
 	public NewInstanceMethod(ObjExpr objx, ObjMethod parent){
 		super(objx, parent);
@@ -5812,6 +5813,7 @@ public static class NewInstanceMethod extends ObjMethod{
 				}
 			Map matches = findMethodsWithNameAndArity(name.name, parms.count(), overrideables);
 			Object mk = msig(name.name, pclasses);
+			java.lang.reflect.Method m = null;
 			if(matches.size() &gt; 0)
 				{
 				//multiple methods
@@ -5820,7 +5822,7 @@ public static class NewInstanceMethod extends ObjMethod{
 					//must be hinted and match one method
 					if(!hinted)
 						throw new IllegalArgumentException(&quot;Must hint overloaded method: &quot; + name.name);
-					java.lang.reflect.Method m = (java.lang.reflect.Method) matches.get(mk);
+					m = (java.lang.reflect.Method) matches.get(mk);
 					if(m == null)
 						throw new IllegalArgumentException(&quot;Can't find matching overloaded method: &quot; + name.name);
 					if(m.getReturnType() != method.retClass)
@@ -5832,7 +5834,7 @@ public static class NewInstanceMethod extends ObjMethod{
 					//if hinted, validate match,
 					if(hinted)
 						{
-						java.lang.reflect.Method m = (java.lang.reflect.Method) matches.get(mk);
+						m = (java.lang.reflect.Method) matches.get(mk);
 						if(m == null)
 							throw new IllegalArgumentException(&quot;Can't find matching method: &quot; + name.name +
 							                                   &quot;, leave off hints for auto match.&quot;);
@@ -5842,7 +5844,7 @@ public static class NewInstanceMethod extends ObjMethod{
 						}
 					else //adopt found method sig
 						{
-						java.lang.reflect.Method m = (java.lang.reflect.Method) matches.values().iterator().next();
+						m = (java.lang.reflect.Method) matches.values().iterator().next();
 						method.retClass = m.getReturnType();
 						pclasses = m.getParameterTypes();
 						}
@@ -5857,6 +5859,7 @@ public static class NewInstanceMethod extends ObjMethod{
 				//validate unque name+arity among additional methods
 
 			method.retType = Type.getType(method.retClass);
+			method.exclasses = m.getExceptionTypes();
 
 			for(int i = 0; i &lt; parms.count(); i++)
 				{
@@ -5908,11 +5911,17 @@ public static class NewInstanceMethod extends ObjMethod{
 	public void emit(ObjExpr obj, ClassVisitor cv){
 		Method m = new Method(getMethodName(), getReturnType(), getArgTypes());
 
+		Type[] extypes = null;
+		if(exclasses.length &gt; 0)
+			{
+			extypes = new Type[exclasses.length];
+			for(int i=0;i&lt;exclasses.length;i++)
+				extypes[i] = Type.getType(exclasses[i]);
+			}
 		GeneratorAdapter gen = new GeneratorAdapter(ACC_PUBLIC,
 		                                            m,
 		                                            null,
-		                                            //todo don't hardwire this
-		                                            EXCEPTION_TYPES,
+		                                            extypes,
 		                                            cv);
 		gen.visitCode();
 		Label loopLabel = gen.mark();</diff>
      <filename>src/jvm/clojure/lang/Compiler.java</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>41df729352e53631faf93d657c542cb4a37e6e2e</id>
    </parent>
  </parents>
  <author>
    <name>Rich Hickey</name>
    <email>richhickey@gmail.com</email>
  </author>
  <url>http://github.com/richhickey/clojure/commit/406fc1c00f8138d47445047c9e17a8af12fefcff</url>
  <id>406fc1c00f8138d47445047c9e17a8af12fefcff</id>
  <committed-date>2009-11-04T08:11:39-08:00</committed-date>
  <authored-date>2009-11-04T08:11:39-08:00</authored-date>
  <message>generate same exception types as interface methods being implemented</message>
  <tree>8710a87d4433f1fac59b1afd693d35fc84fff88f</tree>
  <committer>
    <name>Rich Hickey</name>
    <email>richhickey@gmail.com</email>
  </committer>
</commit>
