com.lightningkite.lightningdb.UniqueViolationException.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of server-core Show documentation
Show all versions of server-core Show documentation
A set of tools to fill in/replace what Ktor is lacking in.
The newest version!
package com.lightningkite.lightningdb
class UniqueViolationException(
cause: Throwable?,
val key: String? = null,
val collection: String? = null,
): Exception(
key?.let { "Key $key already exists in $collection" } ?: collection?.let { "Unique violation in $collection" } ?: "Unique violation",
cause
) {
override val message: String
get() = super.message!!
}