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

io.odin.meta.ToThrowable.scala Maven / Gradle / Ivy

package io.odin.meta

/**
  * Type class that converts a value of type `E` into Throwable
  */
trait ToThrowable[E] {
  def throwable(e: E): Throwable
}

object ToThrowable {
  implicit def toThrowable[E <: Throwable]: ToThrowable[E] = (e: E) => e
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy