6) Best Practices
package com.gs.ilp.exceptionhandling;
public class MyException extends Exception {
private String errorCode;
MyException(String message, Exception e, String errorCode) {
super(message, e);
this.setErrorCode(errorCode);
}
public MyException(String string, String string2) {
super(string);
errorCode = string2;
}
public String getErrorCode() {
return errorCode;
}
public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
}
}Last updated
Was this helpful?