Skip to content

Commit 85a9fb1

Browse files
committed
fixed exception text appears twice
1 parent 3890691 commit 85a9fb1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/org/mybatis/spring/MyBatisExceptionTranslator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public DataAccessException translateExceptionIfPossible(RuntimeException e) {
7070
}
7171
return this.exceptionTranslator.translate(e.getMessage() + "\n", null, (SQLException) e.getCause());
7272
}
73-
return new MyBatisSystemException(e.getMessage(), e);
73+
return new MyBatisSystemException(e);
7474
}
7575

7676
/**

src/main/java/org/mybatis/spring/MyBatisSystemException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ public class MyBatisSystemException extends UncategorizedDataAccessException {
3131

3232
private static final long serialVersionUID = -5284728621670758939L;
3333

34-
public MyBatisSystemException(String msg, Throwable cause) {
35-
super(msg, cause);
34+
public MyBatisSystemException(Throwable cause) {
35+
super(null, cause);
3636
}
3737

3838
}

0 commit comments

Comments
 (0)