From c1a0be3f5c0b7ef8dec4413868421c10c8e30a0a Mon Sep 17 00:00:00 2001 From: lihan Date: Mon, 23 Oct 2023 16:30:29 +0800 Subject: [PATCH] Make Database#exceptionTranslator receive a nullable throwable. o.s.jdbc.support.AbstractFallbackSQLExceptionTranslator#translate has been allowed nullable return value in new version See:https://github.com/spring-projects/spring-framework/commit/e9cded560d6ecb73aa5bfca57e06b09fa0013294 --- ktorm-core/src/main/kotlin/org/ktorm/database/Database.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ktorm-core/src/main/kotlin/org/ktorm/database/Database.kt b/ktorm-core/src/main/kotlin/org/ktorm/database/Database.kt index 070216a11..4ff0c17da 100644 --- a/ktorm-core/src/main/kotlin/org/ktorm/database/Database.kt +++ b/ktorm-core/src/main/kotlin/org/ktorm/database/Database.kt @@ -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.