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

urldsl.errors.ErrorFromThrowable.scala Maven / Gradle / Ivy

The newest version!
package urldsl.errors

/** You can implement this trait for your own error type A, and give a implicit instance in order to use the
  * functionality requiring it, e.g., in [[urldsl.vocabulary.FromString]].
  *
  * @tparam A
  *   tye type of your error.
  */
trait ErrorFromThrowable[A] {

  def fromThrowable(throwable: Throwable): A

}

object ErrorFromThrowable {
  def apply[A](implicit error: ErrorFromThrowable[A]): ErrorFromThrowable[A] = error
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy