Basic infrastructure for TransactionErrorBehavior

Mainly per comments from Heikki.