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
Type members
Inherited classlikes
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 toSuccessOrFailure
, which provides thesuccess
andfailure
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 thesuccess
andfailure
methods
- Inherited from:
- TryValues