You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/01/05 12:01:42 UTC

[GitHub] [dolphinscheduler] devosend commented on a change in pull request #7631: [python] Fix database error handler about no datasource name

devosend commented on a change in pull request #7631:
URL: https://github.com/apache/dolphinscheduler/pull/7631#discussion_r778765298



##########
File path: dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/database.py
##########
@@ -52,5 +55,10 @@ def get_database_info(self, name) -> Dict:
             return self._database
         else:
             gateway = launch_gateway()
-            self._database = gateway.entry_point.getDatasourceInfo(name)
+            try:
+                self._database = gateway.entry_point.getDatasourceInfo(name)
+            # Handler database source do not exists error, for now we just terminate the process.
+            except Py4JJavaError:

Review comment:
       Except error is not just a situation. Should we use `Py4JJavaError.java_exception` to display clear 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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org