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

com.convergencelabs.convergence.server.util.EitherUtils.scala Maven / Gradle / Ivy

package com.convergencelabs.convergence.server.util

import scala.util.{Failure, Success, Try}

object EitherUtils {
  def tryToEither[T](t: Try[T]): Either[Throwable, T] = {
    t match {
      case Failure(exception) => Left(exception)
      case Success(value) =>Right(value)
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy