catching decode exception