Catch
A container class for catch/finally logic.
Pass a different value for rethrow if you want to probably unwisely allow catching control exceptions and other throwables which the rest of the world may expect to get through.
Type parameters
- T
-
result type of bodies used in try and catch blocks
Value parameters
- fin
-
Finally logic which if defined will be invoked after catch logic
- pf
-
Partial function used when applying catch logic to determine result value
- rethrow
-
Predicate on throwables determining when to rethrow a caught Throwable
Attributes
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
Creates a new Catch container from this object and the supplied finally body.
Creates a new Catch container from this object and the supplied finally body.
Value parameters
- body
-
The additional logic to apply after all existing finally bodies
Attributes
Applies this catch logic to the supplied body.
Applies this catch logic to the supplied body.
Attributes
Applies this catch logic to the supplied body, mapping the result into Either[Throwable, T] - Left(exception) if an exception was caught, Right(T) otherwise.
Applies this catch logic to the supplied body, mapping the result into Either[Throwable, T] - Left(exception) if an exception was caught, Right(T) otherwise.
Attributes
Applies this catch logic to the supplied body, mapping the result into Option[T] - None if any exception was caught, Some(T) otherwise.
Applies this catch logic to the supplied body, mapping the result into Option[T] - None if any exception was caught, Some(T) otherwise.
Attributes
Creates a new Catch with additional exception handling logic.
Creates a new Catch with additional exception handling logic.
Attributes
Creates a Catch object with the same isDefinedAt logic as this one, but with the supplied apply method replacing the current one.
Creates a Catch object with the same isDefinedAt logic as this one, but with the supplied apply method replacing the current one.
Attributes
Applies this catch logic to the supplied body, mapping the result into Try[T] - Failure if an exception was caught, Success(T) otherwise.
Applies this catch logic to the supplied body, mapping the result into Try[T] - Failure if an exception was caught, Success(T) otherwise.