How do I handle and rethrow the exception in lambda? When I try to surround the call with try/catch block, it just catches it inside the lambda expression. I have ServiceException in method signature, so I want just to rethrow it. Is it possible or am I missing something?
BiFunction<Account, LocalDate, AccountBalance> getBalance;
getBalance = (account, date1) -> balanceProvider.getBalance(account, date1); //balanceProvider.getBalance unhandled ServiceException