com.wavesenterprise.utils.EitherUtils.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of we-utils Show documentation
Show all versions of we-utils Show documentation
Library for Waves Enterprise blockchain platform
package com.wavesenterprise.utils
object EitherUtils {
implicit class EitherExt[A, B](ei: Either[A, B]) {
def explicitGet(): B = ei match {
case Left(value) => throw new Exception(value.toString)
case Right(value) => value
}
}
}