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

advxml.data.ThrowableNel.scala Maven / Gradle / Ivy

package advxml.data

import advxml.data.error.AggregatedException
import cats.data.NonEmptyList

object ThrowableNel {

  def toThrowable(tnel: ThrowableNel): Throwable = AggregatedException(tnel)

  def fromThrowable(tnel: Throwable): ThrowableNel = tnel match {
    case ex: AggregatedException => ex.exceptions
    case ex                      => NonEmptyList.one(ex)
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy