#2198 How to override Java method with parameter which is an Exception

lel4866 Thu 7 Nov 2013

I have the following defined in a Java interface (which I can't modify) compiled into a jar:

In the .java file: void error1( Exception e);

I can't figure out the proper combinations of Fan usings and signatures to get the override to compile. All the other stuff from the jar works:

using [java] com.ib.client

override public Void error1(Err? e) {}

gives me the error:

Parameter mismatch in override of [java]com.ib.client::EWrapper.error1
error1([java]java.lang::Exception?) != error1(sys::Err?)

lel4866 Thu 7 Nov 2013

Got it:

using [java] java.lang::Exception

and

override public Void error1(Exception? e) {}

Login or Signup to reply.