我遇到了一个扩展 Exception 的类:
public class MyException extends Exception
{
public MyException()
{
super();
}
public MyException(final String argMessage, final Throwable argCause)
{
super(argMessage, argCause);
}
public MyException(final String argMessage)
{
super(argMessage);
}
public MyException(final Throwable argCause)
{
super(argCause);
}
}
由于所有重写的构造函数都只是调用超类 Exception ,因此以这种方式扩展异常不是毫无意义吗?