This is an automated email from the ASF dual-hosted git repository.

jin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph.git


The following commit(s) were added to refs/heads/master by this push:
     new 23776a768 fix: optimizing ClassNotFoundException error message for 
MYSQL (#2246)
23776a768 is described below

commit 23776a7686c24d4e6cf4f400b863b5cda7c714be
Author: Z-HUANT <[email protected]>
AuthorDate: Mon Jul 17 16:49:37 2023 +0800

    fix: optimizing ClassNotFoundException error message for MYSQL (#2246)
---
 .../src/main/java/org/apache/hugegraph/StandardHugeGraph.java           | 2 +-
 .../java/org/apache/hugegraph/backend/store/mysql/MysqlSessions.java    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java 
b/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java
index 42a67158e..db37d0a4b 100644
--- a/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java
+++ b/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java
@@ -460,7 +460,7 @@ public class StandardHugeGraph implements HugeGraph {
         } catch (BackendException e) {
             String message = "Failed to open schema transaction";
             LOG.error("{}", message, e);
-            throw new HugeException(message);
+            throw new HugeException(message, e);
         }
     }
 
diff --git 
a/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlSessions.java
 
b/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlSessions.java
index 8956a6e70..de999b738 100644
--- 
a/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlSessions.java
+++ 
b/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlSessions.java
@@ -283,7 +283,7 @@ public class MysqlSessions extends BackendSessionPool {
             // Register JDBC driver
             Class.forName(driverName);
         } catch (ClassNotFoundException e) {
-            throw new BackendException("Invalid driver class '%s'",
+            throw new BackendException("Failed to register JDBC driver. Class 
'%s' not found. Please check if the MySQL driver package is available.",
                                        driverName);
         }
         return DriverManager.getConnection(url, username, password);

Reply via email to