This trait provides methods to catch exceptions and transform them into values which can be passed to further computations.
It uses the facilities found in the scala.util.control.Exception object while providing a more concise api on some use cases.
Attributes
- See also
-
org.specs2.control.ExceptionsSpec for examples
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object Exceptions.type
Members list
Value members
Concrete methods
try to evaluate an expression, returning Either
try to evaluate an expression, returning Either
If the expression throws any Throwable a function f is used to return the left value of the Either returned value.
Attributes
try to evaluate an expression, returning a value T
try to evaluate an expression, returning a value T
If the expression throws a Throwable a function f is used to return a value of the expected type.
Attributes
try to evaluate an expression, returning a value T
try to evaluate an expression, returning a value T
If the expression throws a Throwable, then return a default value
Attributes
try to evaluate an expression, returning Either
try to evaluate an expression, returning Either
If the expression throws an Exception a function f is used to return the left value of the Either returned value.
Attributes
try to apply a partial function to a value
try to apply a partial function to a value
Attributes
try to apply a partial function to a value, with a default value if something goes wrong
try to apply a partial function to a value, with a default value if something goes wrong
Attributes
try to evaluate an expression and return ok if nothing fails. return ko otherwise
try to evaluate an expression and return ok if nothing fails. return ko otherwise
Attributes
try to evaluate an expression and return true if nothing fails. return false otherwise
try to evaluate an expression and return true if nothing fails. return false otherwise
Attributes
try to evaluate an expression, returning a value T
try to evaluate an expression, returning a value T
If the expression throws an Exception a function f is used to return a value of the expected type.
Attributes
try to evaluate an expression and return it if nothing fails. return ko otherwise
try to evaluate an expression and return it if nothing fails. return ko otherwise
Attributes
try to evaluate an expression and return it in an Option if nothing fails. return None otherwise
try to evaluate an expression and return it in an Option if nothing fails. return None otherwise
Attributes
try to evaluate an expression, returning Either
try to evaluate an expression, returning Either
If the expression throws an Exception a function f is used to return the left value of the Either returned value.
Attributes
try to evaluate an expression, returning Either
try to evaluate an expression, returning Either
If the expression throws an Exception a function f is used to return the left value of the Either returned value.
Attributes
try to evaluate an expression, returning an Option
try to evaluate an expression, returning an Option
The 'tryo' name comes from the lift project: http://liftweb.net
Attributes
- Returns
-
None if there is an exception, or Some(value)