Bug 826297 - Catch exceptions. r=sicking

--HG--
extra : rebase_source : c160410cbdd472de446bf1b486604b39656ccb91