From d9982c61434b2b5adc0467675c67572d64932fe6 Mon Sep 17 00:00:00 2001 From: Rivers-Shall Date: Tue, 20 Aug 2019 20:53:11 +0800 Subject: [PATCH] Adjust error message in the thrown exception --- .../cloud/sentinel/custom/SentinelBeanPostProcessor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-cloud-alibaba-sentinel/src/main/java/com/alibaba/cloud/sentinel/custom/SentinelBeanPostProcessor.java b/spring-cloud-alibaba-sentinel/src/main/java/com/alibaba/cloud/sentinel/custom/SentinelBeanPostProcessor.java index d9c150c0..ce94da20 100644 --- a/spring-cloud-alibaba-sentinel/src/main/java/com/alibaba/cloud/sentinel/custom/SentinelBeanPostProcessor.java +++ b/spring-cloud-alibaba-sentinel/src/main/java/com/alibaba/cloud/sentinel/custom/SentinelBeanPostProcessor.java @@ -149,8 +149,8 @@ public class SentinelBeanPostProcessor implements MergedBeanDefinitionPostProces beanName, standardReturnType.getName(), blockClass.getName(), blockMethod, argsStr); throw new IllegalArgumentException(type + " method return value in bean[" - + beanName + "] is not ClientHttpResponse: " + blockClass.getName() - + "#" + blockMethod + argsStr); + + beanName + "] is not " + standardReturnType.getName() + ": " + + blockClass.getName() + "#" + blockMethod + argsStr); } if (type.equals(SentinelConstants.BLOCK_TYPE)) { BlockClassRegistry.updateBlockHandlerFor(blockClass, blockMethod,