how to throw exception in web3j filter

for example code

web3j.transactionObservable().subscribe(tx-> {
     web3j.ethGetBlockByHash(tx.getBlockHash(), false).send();

Unhandled Exception appears in send() Is there a way to throw an exception without trycatch?

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.