Added try/catch around exec code.