TryValues

object TryValues extends TryValues

Companion object that facilitates the importing of TryValues members as an alternative to mixing it in. One use case is to import TryValues's members so you can use success and failure on Try in the Scala interpreter.

Companion:
class
trait TryValues
trait Serializable
class Object
trait Matchable
class Any

Type members

Inherited classlikes

class SuccessOrFailure[T](theTry: Try[T], pos: Position) extends Serializable

Wrapper class that adds success and failure methods to scala.util.Try, allowing you to make statements like:

Wrapper class that adds success and failure methods to scala.util.Try, allowing you to make statements like:

try1.success.value should be > 9
try2.failure.exception should have message "/ by zero"
Value parameters:
theTry

An Try to convert to SuccessOrFailure, which provides the success and failure methods.

Inherited from:
TryValues

Implicits

Inherited implicits

implicit def convertTryToSuccessOrFailure[T](theTry: Try[T])(implicit pos: Position): SuccessOrFailure[T]

Implicit conversion that adds success and failure methods to Try.

Implicit conversion that adds success and failure methods to Try.

Value parameters:
theTry

the Try to which to add the success and failure methods

Inherited from:
TryValues