All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lightningkite.lightningdb.UniqueViolationException.kt Maven / Gradle / Ivy

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!!
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy