private static Object tryCall ( String methodName , Throwing . Supplier < Object > supplier ) { try { return supplier . get ( ) ; } catch ( Throwable error ) { return new CallException ( methodName , error ) ; } }
Executes the given function return any exceptions it might throw as wrapped values .