Bug 1109889 - Share more exception handling code. r=nbp

--HG--
extra : rebase_source : 4bb5eaff6c0e97a8b8c8b2b491597cf222ce5606