Catch and log errors in contributions formatting

Change-Id: I0afcdcd5063217fa06cb42083582cfb2fdb2b13e
(cherry picked from commit 3549cda53fc7654154028109cbad9456d3aef02a)