shorthand constructor for scala.util.Success
shorthand constructor for scala.util.Success
scala> import sclib.ops.`try`._ scala> 3.success res0: scala.util.Try[Int] = Success(3)
shorthand constructor for Failure
from a String
shorthand constructor for Failure
from a String
scala> import sclib.ops.`try`._ scala> "BOOM".failure res0: scala.util.Try[Nothing] = Failure(java.lang.Exception: BOOM)
shorthand constructor for Failure
from a Throwable
shorthand constructor for Failure
from a Throwable
scala> import sclib.ops.`try`._ scala> new IllegalArgumentException("BOOM").failure[Int] res0: scala.util.Try[Int] = Failure(java.lang.IllegalArgumentException: BOOM)
reducing many Try
s into a single Try
extensions on Try
instances
Try
extensionscheck the member documentation for examples