
harness.sql.error.ConnectionError.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of harness-sql_3 Show documentation
Show all versions of harness-sql_3 Show documentation
Miscellaneous libraries/utilities for Scala.
package harness.sql.error
import harness.core.*
sealed trait ConnectionError extends Throwable {
override final def getMessage: String = this match {
case ConnectionError.Generic(cause) =>
s"Generic connection error (${cause.getClass.getName}): ${cause.safeGetMessage}"
}
}
object ConnectionError {
final case class Generic(cause: Throwable) extends ConnectionError
// TODO (KR) : handle more specific cases
def apply(cause: Throwable): ConnectionError =
ConnectionError.Generic(cause)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy