GLBB commented on a change in pull request #9583:
URL: https://github.com/apache/shardingsphere/pull/9583#discussion_r587550679



##########
File path: 
shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/datasource/DataSourceConfiguration.java
##########
@@ -111,9 +112,13 @@ public DataSource createDataSource() {
             if (SKIPPED_PROPERTY_NAMES.contains(entry.getKey())) {
                 continue;
             }
-            Optional<Method> setterMethod = findSetterMethod(methods, 
entry.getKey());
-            if (setterMethod.isPresent()) {
-                setterMethod.get().invoke(result, entry.getValue());
+            try {
+                Optional<Method> setterMethod = findSetterMethod(methods, 
entry.getKey());
+                if (setterMethod.isPresent()) {
+                    setterMethod.get().invoke(result, entry.getValue());
+                }
+            } catch (Exception ex) {
+                throw new ShardingSphereConfigurationException(ex, 
String.format("datasource property %s configure error", entry.getKey()));

Review comment:
       how about this exception message: ยท`String.format("Incorrect 
configuration item: the property %s of the dataSource. the reason is %s", 
ex.getExceptionMessage())`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to