看看那有语法错误

来源:百度知道 编辑:UC知道 时间:2024/05/16 09:11:47
mport java.io.*;
public class SpecialIoException throws IOException{
public String SpecialIoExceptin(){
super("Special IO Exception Occurred");
}
public SpecialIoException(String message){
this(message);
}
}

public class DebugException{
public static void main(String args[]){
try{
throw new SpecialIoException();
}
catch(Exception exception){
System.err.println(exception.toString());
}
catch(IOException ioException){
System.err.println(ioException.toString());
}
catch(SpecialloException sIoException){
sIoException.toString();
}
}
}

@SuppressWarnings("serial")
public class SpecialIoException extends Throwable{

public SpecialIoException(){
super("Special IO Exception Occurred");
}

public SpecialIoException(String message){
super(message);
}

}

import java.io.IOException;

public class DebugException {
public static void main(String args[]) throws IOException {
try {
throw new SpecialIoException();
} catch (Exception exception) {
System.err.println(exception.toString());
} catch (SpecialIoException e) {
e.toString();
e.printStackTrace();
}
}
}