Try

scala.util.Try
See theTry companion class
object Try

Attributes

Companion
class
Source
Try.scala
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Try.type

Members list

Type members

Inherited and Abstract types

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
Source
Mirror.scala

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

def apply[T](r: => T): Try[T]

Constructs a Try using the by-name parameter as a result value.

Constructs a Try using the by-name parameter as a result value.

The evaluation of r is attempted once.

Any non-fatal exception is caught and results in a Failure that holds the exception.

Value parameters

r

the result value to compute

Attributes

Returns

the result of evaluating the value, as a Success or Failure

Source
Try.scala