public static class ExceptionControl.Catch<R> extends Object implements F1<Function0<R>,R>
| Constructor and Description |
|---|
ExceptionControl.Catch(Seq<Class<? extends Throwable>> classes,
Function1<Throwable,R> withApply) |
ExceptionControl.Catch(Seq<Class<? extends Throwable>> classes,
Function1<Throwable,R> withApply,
boolean promiscuously) |
ExceptionControl.Catch(Seq<com.m3.scalaflavor4j.ExceptionControl.Catch.HandlerDef> handlerDefinitions,
boolean promiscuously) |
| Modifier and Type | Method and Description |
|---|---|
ExceptionControl.Catch<R> |
andFinally(VoidFunction0 body) |
R |
apply(Function0<R> block) |
Either<Throwable,R> |
either(Function0<R> block)
Apply this catch logic to the supplied body, mapping the result into
Either[Throwable, T] - Left(exception) if an exception was caught,
Right(T) otherwise.
|
Option<R> |
opt(Function0<R> block)
Apply this catch logic to the supplied body, mapping the result into
Option[T] - None if any exception was caught, Some(T) otherwise.
|
ExceptionControl.Catch<R> |
or(ExceptionControl.Catch<R> that)
Create a new Catch with additional exception handling logic.
|
public ExceptionControl.Catch(Seq<com.m3.scalaflavor4j.ExceptionControl.Catch.HandlerDef> handlerDefinitions, boolean promiscuously)
public ExceptionControl.Catch(Seq<Class<? extends Throwable>> classes, Function1<Throwable,R> withApply)
public ExceptionControl.Catch<R> andFinally(VoidFunction0 body)
public Either<Throwable,R> either(Function0<R> block)
public Option<R> opt(Function0<R> block)
public ExceptionControl.Catch<R> or(ExceptionControl.Catch<R> that)
Copyright © 2015. All rights reserved.