public static class Try.MyTryCatch<V,X extends java.lang.Throwable> extends java.lang.Object implements Try.TryCatch<V,X>
| Constructor and Description |
|---|
MyTryCatch() |
| Modifier and Type | Method and Description |
|---|---|
<T> Try.AndFinally<T,V,X> |
tryThis(Try.CheckedFunction<V,T,X> catchBlock)
Build another stage in try / catch / finally block
This defines the CheckedFunction that will be run in the main body of the catch block
Next step can define the finally block
|
<T> Try<T,X> |
tryWithResources(Try.CheckedFunction<V,T,X> catchBlock)
Will execute and run the CheckedFunction supplied and will automatically
safely close any Closeables supplied during init (either individually or inside an iterable)
|
public <T> Try.AndFinally<T,V,X> tryThis(Try.CheckedFunction<V,T,X> catchBlock)
Try.TryCatchtryThis in interface Try.TryCatch<V,X extends java.lang.Throwable>catchBlock - To Trypublic <T> Try<T,X> tryWithResources(Try.CheckedFunction<V,T,X> catchBlock)
Try.TryCatchtryWithResources in interface Try.TryCatch<V,X extends java.lang.Throwable>catchBlock - CheckedFunction to Try