If you are using RE framework and try/catch then catch the exception and log them as error. In the end process state use terminate workflow after logging the exception.
Categorize the types of exception before logging Business vs Application
Set the transaction to failed in the properties of set transaction status activity. (preferred when using queues but should be ok for normal usage too.)