Name: akC57697 Date: 02/07/98
The compiler should fail to compile this example with error message:
"Exception java.io.IOException must be caught, or it must be
declared in the throws clause of this method."
Instead of this , javac report:"JAVAC MESSAGE FILE IS BROKEN"
See output.
------------------ Example -------------
import java.io.IOException;
class NewException extends IOException {
public NewException(String s) {
throw new IOException(s);
}
}
-----------------------------------------
Output:
(novo35 54): jdk115
(novo35 55): javac NewException.java
NewException.java:5: Exception java.io.IOException must be caught, or it must be declared in the throws clause of this method.
throw new IOException(s);
^
1 error
(novo35 56): jdk1.2
(novo35 57): javac NewException.java
NewException.java:5: JAVAC MESSAGE FILE IS BROKEN: key=javac.err.constructor.excemption, arguments=java.io.IOException, null, null
throw new IOException(s);
^
1 error
(novo35 58): java -fullversion
java full version "JDK-1.2beta3-F"
--------------------------------------------------------------------
Moreover, please look at the word "excemption" in this javac output.
--------------------------------------------------------------------