Returns the given function applied to the value from this Return or returns this if this is a Throw.
Returns the given function applied to the value from this Return or returns this if this is a Throw. Alias for flatMap
Returns the value from this Return or throws the exception if this is a Throw
Invoked regardless of whether the computation completed successfully or unsuccessfully.
Invoked regardless of whether the computation completed
successfully or unsuccessfully. Implemented in terms of
respond
so that subclasses control evaluation order. Returns a
chained this
as in respond
.
Converts this to a Throw if the predicate does not obtain.
Returns the given function applied to the value from this Return or returns this if this is a Throw.
Applies the given function f if this is a Result.
Applies the given function f if this is a Result.
Returns the value from this Return or throws the exception if this is a Throw.
Returns the value from this Return or throws the exception if this is a Throw. Alias for apply()
Returns the value from this Return or the given argument if this is a Throw.
Returns the value from this Return or the given argument if this is a Throw.
Calls the exceptionHandler with the exception if this is a Throw.
Returns true if the Try is a Return, false otherwise.
Returns true if the Try is a Throw, false otherwise.
Maps the given function to the value from this Return or returns this if this is a Throw
Invoke the function on the error, if the computation was unsuccessful.
Invoked only if the computation was successful.
Calls the exceptionHandler with the exception if this is a Throw.
Invokes the given closure when the value is available.
Invokes the given closure when the value is available. Returns another 'This[R]' that is guaranteed to be available only *after* 'k' has run. This enables the enforcement of invocation ordering.
Returns None if this is a Throw or a Some containing the value if this is a Return
Returns None if this is a Throw or a Some containing the value if this is a Return
Invokes the given transformation when the value is available, returning the transformed value.
Invokes the given transformation when the value is available, returning the transformed value. This method is like a combination of flatMap and rescue. This method is typically used for more imperative control-flow than flatMap/rescue which often exploits the Null Object Pattern.