Это исходный код исключения
public class NoValueForParametarException extends Exception {
private Exception nestedException;
 private int errorCode;
 public NoValueForParametarException(String message) {
  super(message);
 }
 public NoValueForParametarException(Exception ex,String message) {
  super(message);
  this.nestedException = ex;
 }
 public NoValueForParametarException(String message, int errorCode) {
  super(message);
  this.setErrorCode(errorCode);
 }
 public Exception getNestedException() {
  return this.nestedException;
 }
 public void setNestedException(Exception nestedException) {
  this.nestedException = nestedException;
 }
 public int getErrorCode() {
  return this.errorCode;
 }
 public void setErrorCode(int errorCode) {
  this.errorCode = errorCode;
 }
 public String toString() {
  StringBuffer errorMsg = new StringBuffer();
  errorMsg.append("[" + super.getMessage() + "]:");
  errorMsg.append((this.nestedException != null) ? ("\n[Nested exception]:" +   this.nestedException):"");
  return errorMsg.toString();
 }
}
и это новый
public class NoValueForParametarWebServiceException extends NoValueForParametarException {
 public NoValueForParametarWebServiceException(String message) {
  super(message);
 }
 public NoValueForParametarWebServiceException(Exception ex,String message) {
  super(message);
  this.setNestedException(ex);
 }
 public NoValueForParametarWebServiceException(String message, int errorCode) {
  super(message);
  this.setErrorCode(errorCode);
 }
 public String toString() {
  StringBuffer errorMsg = new StringBuffer();
  errorMsg.append(super.getMessage());
  errorMsg.append((this.getNestedException() != null) ?   ("\n[Nested     exception]:" + this.getNestedException()):"");  
  return errorMsg.toString();
 }
}
Все, что мне нужно, это изменить часть метода toString(), поэтому вместо errorMsg.append("[" + super.getMessage() + "]:"); у меня есть errorMsg.append(super.getMessage());. Проблема возникает, когда в методе создается оригинал, потому что блок catch, установленный на NoValueForParametarWebServiceException, не захватывает оригинал. Я знаю, что могу поймать оригинал и просто перебросить новую (что тоже будет приятно), но мне было интересно, есть ли другой способ.
  РЕДАКТИРОВАТЬ: Кажется, что мне нужно, неясно, так что яснее:
Программа выбрасывает NoValueForParametarException. Я хочу его поймать, но использовать метод toString() NoValueForParametarWebServiceException (это единственная причина создания нового класса), потому что мне нужен выходной формат новой версии без изменения старого.