创建异常类时可以只提供“特定”构造函数:
public CircularLinkException(final String msg, final String link)
{
super(msg);
link = inputName;
}
或者我应该实现以下构造函数Exception
:
public class CircularLinkException extends Exception
{
public CircularLinkException() { /* ... */ }
public CircularLinkException(final String msg) { /* ... */ }
public CircularLinkException(final Throwable t) { /* ... */ }
public CircularLinkException(final String msg, final Throwable t) { /* ... */ }
}