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

harness.sql.error.ConnectionError.scala Maven / Gradle / Ivy

There is a newer version: 5.1.3
Show newest version
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