How to know the transaction will suceed or not before it is added to block?

Hello everybody.
I want to know that if there is a way to check the transaction will go successfull before it is added to block.
So at the point when we submit the transaction to the ledger, can we know this?

Thank you.