public static EConnectionErrorCode resolveErrorCodeFromException(Throwable e) {
        final String stackErrorMsg = ExceptionUtils.getFullStackTrace(e);
        return Arrays.stream(values())
                .filter(errorCode -> matchKnowError(errorCode, stackErrorMsg))
                .findAny()
                .orElse(ERROR_NOT_MATCH);
    }
Date: 2020/4/2
Company: www.dtstack.com
@author maqi
core/src/main/java/com/dtstack/flink/sql/enums/EConnectionErrorCode.java