错误码的 Starter 的初始化,完成

This commit is contained in:
YunaiV
2020-07-20 19:18:27 +08:00
parent 0df486a677
commit 187b17ed01
50 changed files with 1249 additions and 611 deletions

View File

@@ -97,6 +97,10 @@ public class DubboProviderExceptionFilter implements Filter, Filter.Listener {
private GlobalException defaultExceptionHandler(Throwable exception, Invocation invocation) {
logger.error("[defaultExceptionHandler][service({}) method({}) params({}) 执行异常]",
invocation.getServiceName(), invocation.getServiceName(), invocation.getArguments(), exception);
// 如果已经是 GlobalException 全局异常,直接返回即可
if (exception instanceof GlobalException) {
return (GlobalException) exception;
}
return new GlobalException(INTERNAL_SERVER_ERROR)
.setDetailMessage(this.buildDetailMessage(exception, invocation));
}