lanchengx opened a new issue #11911:
URL: https://github.com/apache/shardingsphere/issues/11911


   Hi, community
   I have some doubts about 
`org.apache.shardingsphere.infra.config.datasource.DataSourceValidator#validate()`;
   Why does this method need to ignore the exception, which will cause the user 
to be unable to see the detailed information of the MysqlSyntaxErrorException.I 
don’t know if it’s specially designed like this?
   
   
![image](https://user-images.githubusercontent.com/52209337/130168035-46cfa5a7-7b55-49c3-a41b-e6c93edcac70.png)
   
   
   For example:
   
   When I use the wrong distSQL to add resources (db3 in the url does not 
exist)。
   
   ```sql
   ADD RESOURCE resource_3 (
       URL="jdbc:mysql://127.0.0.1:3306/db3?serverTimezone=UTC&useSSL=false",
       USER=root,
       PASSWORD=root,
       PROPERTIES("maximumPoolSize"=10,"idleTimeout"="30000")
   );
   ```
   
   Idea's console will print `MysqlSyntaxErrorException: Unknown 
database'db3'`, but the client prompts `Can not add invalid resources 
[resource_3]`.
   
   
![image](https://user-images.githubusercontent.com/52209337/130168954-c095baac-99e8-4d48-9019-6009325121ab.png)
   
   
![image](https://user-images.githubusercontent.com/52209337/130169010-55c382c3-2f78-4731-9ce0-2ace99d16c68.png)
   
   Is it better to prompt for detailed information?
   


-- 
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.

To unsubscribe, e-mail: [email protected]

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


Reply via email to