// Path: jbase-spring/src/main/java/com/jayqqaa12/jbase/spring/exception/BusinessException.java
// public class BusinessException extends RuntimeException {
// 
//     protected int code;
//     protected String msg;
// 
// 
//     public BusinessException(int code) {
//         this(code, LocaleKit.MSG_PREFIX + code, null);
//     }
// 
// 
//     public BusinessException(int code, String msg) {
//         super(msg);
//         this.code = code;
//         this.msg = msg;
//     }
//     
// 
//     public BusinessException(int code, String msg, Throwable e) {
// 
//         super(msg, e);
//         this.code = code;
//         this.msg = msg;
//     }
// 
//     public int getCode() {
//         return code;
//     }
// 
//     @Override
//     public String getMessage() {
// 
//         if (msg.startsWith(LocaleKit.MSG_PREFIX))
//             return LocaleKit.resolverOrGet(this.code, this.msg);
//         else return msg;
//     }
// }


import com.jayqqaa12.jbase.spring.exception.BusinessException;
import org.apache.dubbo.common.extension.Activate;
import org.apache.dubbo.common.logger.Logger;
import org.apache.dubbo.common.logger.LoggerFactory;
import org.apache.dubbo.common.utils.ReflectUtils;
import org.apache.dubbo.common.utils.StringUtils;
import org.apache.dubbo.rpc.*;
import org.apache.dubbo.rpc.service.GenericService;
import java.lang.reflect.Method;
        }

        public void onResponse(Result appResponse, Invoker<?> invoker, Invocation invocation) {
            if (appResponse.hasException() && GenericService.class != invoker.getInterface()) {
                try {
                    Throwable exception = appResponse.getException();
                    if (exception instanceof RuntimeException || !(exception instanceof Exception)) {
                        try {
                            Method method = invoker.getInterface().getMethod(invocation.getMethodName(), invocation.getParameterTypes());
                            Class<?>[] exceptionClassses = method.getExceptionTypes();
                            Class[] var7 = exceptionClassses;
                            int var8 = exceptionClassses.length;

                            for (int var9 = 0; var9 < var8; ++var9) {
                                Class<?> exceptionClass = var7[var9];
                                if (exception.getClass().equals(exceptionClass)) {
                                    return;
                                }
                            }
                        } catch (NoSuchMethodException var11) {
                            return;
                        }

                        this.logger.error("Got unchecked and undeclared exception which called by " + RpcContext.getContext().getRemoteHost() + ". service: " + invoker.getInterface().getName() + ", method: " + invocation.getMethodName() + ", exception: " + exception.getClass().getName() + ": " + exception.getMessage(), exception);
                        String serviceFile = ReflectUtils.getCodeBase(invoker.getInterface());
                        String exceptionFile = ReflectUtils.getCodeBase(exception.getClass());
                        if (serviceFile != null && exceptionFile != null && !serviceFile.equals(exceptionFile)) {
                            String className = exception.getClass().getName();
                            if (!className.startsWith("java.") && !className.startsWith("javax.")) {
                                if (!(exception instanceof RpcException)) {
// Path: jbase-spring/src/main/java/com/jayqqaa12/jbase/spring/exception/BusinessException.java
// public class BusinessException extends RuntimeException {
// 
//     protected int code;
//     protected String msg;
// 
// 
//     public BusinessException(int code) {
//         this(code, LocaleKit.MSG_PREFIX + code, null);
//     }
// 
// 
//     public BusinessException(int code, String msg) {
//         super(msg);
//         this.code = code;
//         this.msg = msg;
//     }
//     
// 
//     public BusinessException(int code, String msg, Throwable e) {
// 
//         super(msg, e);
//         this.code = code;
//         this.msg = msg;
//     }
// 
//     public int getCode() {
//         return code;
//     }
// 
//     @Override
//     public String getMessage() {
// 
//         if (msg.startsWith(LocaleKit.MSG_PREFIX))
//             return LocaleKit.resolverOrGet(this.code, this.msg);
//         else return msg;
//     }
// }


// Path: jbase-spring/src/main/java/com/jayqqaa12/jbase/spring/dubbo/DubboExceptionFilter.java
import com.jayqqaa12.jbase.spring.exception.BusinessException;
import org.apache.dubbo.common.extension.Activate;
import org.apache.dubbo.common.logger.Logger;
import org.apache.dubbo.common.logger.LoggerFactory;
import org.apache.dubbo.common.utils.ReflectUtils;
import org.apache.dubbo.common.utils.StringUtils;
import org.apache.dubbo.rpc.*;
import org.apache.dubbo.rpc.service.GenericService;
import java.lang.reflect.Method;

        }

        public void onResponse(Result appResponse, Invoker<?> invoker, Invocation invocation) {
            if (appResponse.hasException() && GenericService.class != invoker.getInterface()) {
                try {
                    Throwable exception = appResponse.getException();
                    if (exception instanceof RuntimeException || !(exception instanceof Exception)) {
                        try {
                            Method method = invoker.getInterface().getMethod(invocation.getMethodName(), invocation.getParameterTypes());
                            Class<?>[] exceptionClassses = method.getExceptionTypes();
                            Class[] var7 = exceptionClassses;
                            int var8 = exceptionClassses.length;

                            for (int var9 = 0; var9 < var8; ++var9) {
                                Class<?> exceptionClass = var7[var9];
                                if (exception.getClass().equals(exceptionClass)) {
                                    return;
                                }
                            }
                        } catch (NoSuchMethodException var11) {
                            return;
                        }

                        this.logger.error("Got unchecked and undeclared exception which called by " + RpcContext.getContext().getRemoteHost() + ". service: " + invoker.getInterface().getName() + ", method: " + invocation.getMethodName() + ", exception: " + exception.getClass().getName() + ": " + exception.getMessage(), exception);
                        String serviceFile = ReflectUtils.getCodeBase(invoker.getInterface());
                        String exceptionFile = ReflectUtils.getCodeBase(exception.getClass());
                        if (serviceFile != null && exceptionFile != null && !serviceFile.equals(exceptionFile)) {
                            String className = exception.getClass().getName();
                            if (!className.startsWith("java.") && !className.startsWith("javax.")) {
                                if (!(exception instanceof RpcException)) {
                                    if (exception instanceof BusinessException) {