Log exceptions.