Skip to content

Commit

Permalink
refactor:jdbcExcpetion 계층화
Browse files Browse the repository at this point in the history
  • Loading branch information
hum02 committed Sep 30, 2023
1 parent b269c25 commit 2d5f8e5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.sql.SQLException;

public class BadGrammarJdbcException extends RuntimeException {
public class BadGrammarJdbcException extends JdbcException {
public BadGrammarJdbcException(String msg) {
super(msg);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.sql.SQLException;

public class CannotGetJdbcConnectionException extends RuntimeException {
public class CannotGetJdbcConnectionException extends JdbcException {

public CannotGetJdbcConnectionException(String msg) {
super(msg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ private class SqlExceptionTranslator {
"58" // DB2: unexpected system error
);

private RuntimeException translateException(SQLException e) {
private JdbcException translateException(SQLException e) {
String sqlState = e.getSQLState();
String classCode = sqlState.substring(0, 2);
if (DATA_ACCESS_RESOURCE_FAILURE_CODES.contains(classCode)) {
Expand Down

0 comments on commit 2d5f8e5

Please sign in to comment.