com.lightningkite.lightningserver.exceptions.NoExceptionReporter.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.lightningserver.exceptions
import com.lightningkite.lightningserver.serverhealth.HealthStatus
/**
* An ExceptionReporter implementation that does nothing. If you don't want any form of reporting use this.
*/
object NoExceptionReporter : ExceptionReporter {
override suspend fun healthCheck(): HealthStatus =
HealthStatus(HealthStatus.Level.OK, additionalMessage = "No exception reporting")
override suspend fun report(t: Throwable, context: Any?): Boolean = false
}