diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7e5c4023..45de4e3c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,14 +12,17 @@ jobs: build: strategy: matrix: - os: [ macOS-latest ] -# os: [ macOS-latest, ubuntu-18.04 ] GitHub actions removed ubuntu-18.04 -# os: [ macOS-latest, windows-latest, ubuntu-18.04 ] + os: [ macOS-latest, windows-latest, ubuntu-22.04 ] runs-on: ${{matrix.os}} steps: - name: Checkout the repo uses: actions/checkout@v2 + - uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 11 + - name: Install msys2 if: matrix.os == 'windows-latest' uses: msys2/setup-msys2@v2 diff --git a/sqliter-driver/build.gradle.kts b/sqliter-driver/build.gradle.kts index 3c54a9cb..fc436707 100644 --- a/sqliter-driver/build.gradle.kts +++ b/sqliter-driver/build.gradle.kts @@ -33,9 +33,7 @@ fun configInterop(target: org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTar kotlin { jvmToolchain(11) -} -kotlin { val knTargets = listOf( macosX64(), iosX64(), diff --git a/sqliter-driver/src/nativeCommonMain/kotlin/co/touchlab/sqliter/interop/SQLiteException.kt b/sqliter-driver/src/nativeCommonMain/kotlin/co/touchlab/sqliter/interop/SQLiteException.kt index 1ea20cd7..a014b5f6 100644 --- a/sqliter-driver/src/nativeCommonMain/kotlin/co/touchlab/sqliter/interop/SQLiteException.kt +++ b/sqliter-driver/src/nativeCommonMain/kotlin/co/touchlab/sqliter/interop/SQLiteException.kt @@ -1,6 +1,6 @@ package co.touchlab.sqliter.interop -open class SQLiteException internal constructor(message: String, private val config: SqliteDatabaseConfig) : Exception(message) +open class SQLiteException internal constructor(message: String, internal val config: SqliteDatabaseConfig) : Exception(message) class SQLiteExceptionErrorCode internal constructor(message: String, config: SqliteDatabaseConfig, private val errorCode: Int) : SQLiteException(message, config) { val errorType: SqliteErrorType by lazy { @@ -8,6 +8,9 @@ class SQLiteExceptionErrorCode internal constructor(message: String, config: Sql SqliteErrorType.values().find { it.code == checkErrorCode } ?: throw IllegalArgumentException("Unknown errorCode $errorCode, checkErrorCode $checkErrorCode") } + override fun toString(): String { + return "SQLiteExceptionErrorCode(message=$message, errorCode=$errorCode, config=$config)" + } } internal inline fun sqlException(logging: Logger, config: SqliteDatabaseConfig, message: String, errorCode: Int = -1): SQLiteException {