public class MyException extends Exception { private static final long serialVersionUID = 1L; private Type type;
public MyException( Type type ) { super(); this.type = type; } public MyException( Throwable t, Type type ) { super( t ); this.type = type; } public String toString() { return super.toString() + "<" + getErrorType().getErrorCode() + ">"; }
public Type getErrorType() { return type; }
public enum Type { // 系统错误 SYSTEM_ERROR( "99999" ),