You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2023/05/29 07:45:57 UTC
[dubbo] branch 3.2 updated: Enhance generic filter logs (#12417)
This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.2
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.2 by this push:
new 0f910b90e9 Enhance generic filter logs (#12417)
0f910b90e9 is described below
commit 0f910b90e93141f98ae11cbfe36753378aaa5aea
Author: Albumen Kevin <jh...@gmail.com>
AuthorDate: Mon May 29 15:45:49 2023 +0800
Enhance generic filter logs (#12417)
* Enhance generic filter logs
* fix log
---
.../src/main/java/org/apache/dubbo/rpc/filter/GenericFilter.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/GenericFilter.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/GenericFilter.java
index 7967e022c0..b69ba505f0 100644
--- a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/GenericFilter.java
+++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/GenericFilter.java
@@ -21,6 +21,7 @@ import org.apache.dubbo.common.beanutil.JavaBeanDescriptor;
import org.apache.dubbo.common.beanutil.JavaBeanSerializeUtil;
import org.apache.dubbo.common.config.Configuration;
import org.apache.dubbo.common.constants.CommonConstants;
+import org.apache.dubbo.common.constants.LoggerCodeConstants;
import org.apache.dubbo.common.extension.Activate;
import org.apache.dubbo.common.io.UnsafeByteArrayInputStream;
import org.apache.dubbo.common.io.UnsafeByteArrayOutputStream;
@@ -106,7 +107,9 @@ public class GenericFilter implements Filter, Filter.Listener, ScopeModelAware {
|| ProtocolUtils.isGenericReturnRawResult(generic)) {
try {
args = PojoUtils.realize(args, params, method.getGenericParameterTypes());
- } catch (IllegalArgumentException e) {
+ } catch (Exception e) {
+ logger.error(LoggerCodeConstants.PROTOCOL_ERROR_DESERIALIZE, "", "",
+ "Deserialize generic invocation failed. ServiceKey: " + inv.getTargetServiceUniqueName(), e);
throw new RpcException(e);
}
} else if (ProtocolUtils.isGsonGenericSerialization(generic)) {