Skip to content

Commit

Permalink
exceptionTranslator allow return null
Browse files Browse the repository at this point in the history
kotlin-orm#376 
`exceptionTranslator` 声明为 `return non-null`,但 `connectWithSpringSupport `用到的 `org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator` 在 `translator.translate("Ktorm", null, ex) `时会返回 `null`
  • Loading branch information
abop authored Mar 4, 2024
1 parent fc31beb commit e0565b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ktorm-core/src/main/kotlin/org/ktorm/database/Database.kt
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public class Database(
/**
* Function used to translate SQL exceptions to rethrow them to users.
*/
public val exceptionTranslator: ((SQLException) -> Throwable)? = null,
public val exceptionTranslator: ((SQLException) -> Throwable?)? = null,

/**
* Whether we need to always quote SQL identifiers in the generated SQLs.
Expand Down

0 comments on commit e0565b3

Please sign in to comment.