Summary: | Unclear compiler error | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Genady Beryozkin <eclipse> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 2.0 | ||
Target Milestone: | 2.0 M5 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Genady Beryozkin
2002-03-28 09:59:31 EST
Which version of javac have you been tested ? 1.3.1 and 1.4 only report poorly: package p1; import java.io.IOException; public class X extends Y { } class Y { Y() throws IOException { } } D:\>javac p1\X.java -d \test p1\X.java:5: unreported exception java.io.IOException; must be caught or declared to be thrown public class X extends Y { ^ 1 error Anyway, improved error messages for unbound/visibility/ambiguity + unhandled exceptions on both default constructors and implicit super constructor calls. "Default constructor cannot handle exception type java.io.IOException thrown by implicit super constructor. Must define an explicit constructor" Fixed I checked it with 1.2.2 (sometimes it's good to have an old compiler as well. Otherwise I'd have searched for a reason for hours). here is the console output: comp:~>javac test.java test.java:4: A default constructor cannot be created for this class because the constructor of its superclass throws the exception java.rmi.RemoteException. Define the constructor for this class explicitly. public class test extends UnicastRemoteObject { ^ 1 error Closing, fixed. |