处理内部类抛出的异常

private static Throwable getTargetException(Throwable catchedException) {
        
        Throwable targetException = null;
        if (catchedException != null) {

            targetException = DWExceptionUtils.getDWException(catchedException);
            if (targetException == null) {

                targetException = ExceptionUtils.getRootCause(catchedException);
            }
        }
        
        return targetException == null ? catchedException : targetException;
    }

 

posted @ 2020-11-12 15:18  四块五  阅读(220)  评论(0编辑  收藏  举报